Go to Post Wow! Shipping to Israel?!? It's exciting to have a fan from so far away :D - stens987 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #46   Spotlight this post!  
Unread 23-01-2008, 22:04
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Encoder Code

Quote:
Originally Posted by John Hooper View Post
I have MPLAB 8.1, compiler 3.1 set up with Kevin Watson's FRC code, which does compile.
Open up teleop.c in your editor. The one function you really need to know about is Teleop(). During teleoperation mode this function is called when new data has been received from the operator (i.e., robot driver) interface, which has a bunch of joysticks attached. This happens every ~26ms. The idea is to take the driver's input and use it to control a motor. The simplest case would be something like:

pwm07 = p1_y;

This maps the y-axis of the joystick attached to port one of the operator interface to the motor controlled by PMW output seven. The variables are unsigned chars where neutral is 127, full reverse is 0, and full forward is 255. pwm07 and p1_y are #defined in ifi_frc.h. The default mapping that has been used in the past can be found in ifi_code.c/Default_Routine().

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #47   Spotlight this post!  
Unread 18-02-2008, 10:02
avitzur avitzur is offline
Registered User
no team
 
Join Date: Nov 2007
Location: israel
Posts: 2
avitzur is an unknown quantity at this point
clock cod

I am using the 'frc_encoder' from 2006 as a base project and C18 2.4

I wont to use your new 'clock' file from 2008 but it looks for 'ifi_frc.h'
what can i do ??????

avi
  #48   Spotlight this post!  
Unread 18-02-2008, 12:56
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: clock cod

Quote:
Originally Posted by avitzur View Post
I am using the 'frc_encoder' from 2006 as a base project and C18 2.4

I wont to use your new 'clock' file from 2008 but it looks for 'ifi_frc.h'
what can i do ??????

avi
Replace that #include statement with this one: #include <p18cxxx.h>. If you're using 2006 code, it's important to make sure you follow the steps in this document too.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Out of the Box Camera Code russell Programming 9 21-10-2009 05:28
Kevin Watson's encoder code with RPM output MaxM Programming 2 05-02-2005 00:06
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
Updated Encoder Code Available Kevin Watson Programming 2 04-01-2005 01:00
heres the code. y this not working omega Programming 16 31-03-2004 15:18


All times are GMT -5. The time now is 08:26.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi