Go to Post I got to talk with Mr. Flowers briefly last year. I told him that I had wanted to be part of FIRST since about 1980. It was nearly a quarter-century later when my son entered high school and I joined the TechnoKats as a mentor. - Alan Anderson [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 11-02-2007, 01:20
Stuart's Avatar
Stuart Stuart is offline
#include coffee.h
FRC #1745 (P51- Mustangs)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Dallas, TX
Posts: 414
Stuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond reputeStuart has a reputation beyond repute
Send a message via AIM to Stuart
Re: How do I program this sensor?

switch(count)
{
case 1:
//all your if count == 1 here
break;// never ever ever forget to put this . .ever
case 2:
//all your if count == 2 here
break; //EVER
case 3:
.
.
.
.
.
case 8:
//blah
break;
}

also for bidirectional I would have something like this before incrementing the count
if(pwm13 >= 127)
count++;
else
count--;


also when you stop the motor and "remap it" to the joy . .you wont see a stop. it will set pwm13 to 127 then set it to what ever the joy is at when it stopped in the next line. so youll have to figure a way to pause it for a sec(I would suggest using 2 digital buttons one for step up a notch and one for step down . .and some way of overriding)
__________________
Proud mentor of Team #1745 the P-51 Mustangs

If at first it doesn't work, use a hammer.
If that doesn't work, use a bigger hammer.
 


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
Vex line follower sensor kit program jbill30 Programming 5 12-05-2006 14:43
What's happening to this program??? Weightmn General Forum 22 04-04-2005 15:40
TI Pressure Sensor this year? kmcclary Pneumatics 1 20-01-2005 20:53
This board is quiet-- so how bout this election?!?!? archiver 2000 19 24-06-2002 00:23
How do you connect optical sensor? archiver 2001 1 23-06-2002 23:05


All times are GMT -5. The time now is 00:20.

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