View Single Post
  #23   Spotlight this post!  
Unread 24-02-2003, 22:39
Duke 13370's Avatar
Duke 13370 Duke 13370 is offline
C is for cookie...
#0862 (Team Lightning)
Team Role: Webmaster
 
Join Date: Jan 2003
Location: Plymouth, MI
Posts: 215
Duke 13370 will become famous soon enough
Send a message via AIM to Duke 13370
Quote:
Alex you are tired or really not with it. Where did you get 393? Actually I am not doing it like that at all. This is how I am doing it.



code:--------------------------------------------------------------------------------
POT = (POT*127)/254 'Gives me a perportional number between 0 and 127

if POT<63 then
Left_drive = 127 + POT
Right_drive = 125 'Locks wheel
else
Left_drive = 125 'Locks wheel
Right_drive = 127 + (254 + POT)
endif
--------------------------------------------------------------------------------


I think this is right but it is late and I can't find the source I wrote earilier.
Remember ours didn't work earlier, this fixes it, and 127+256=393 (i forgot that 254 thing) this inverses it correctly, the one we had was backwards (close to 127 was sharper turn than 254).
__________________
---Lightning Robotics!---