loading
 
Joystick
Anonymous
13 year
I'm trying to control my two DC motors through the sabertooth 2X25 and a joystick, but my joystick values are from -1000 to 1000 and i want it to be from 0 to 255 any ideas
Anonymous 13 year
This is a common issue. Use one of the scripting modules to scale that value down. Have a look at the Joystick robofile at the bottom of

http://www.roborealm.com/help/CoroWare_CoroBot.php

which has that same/similar issue.

You can also check

http://www.roborealm.com/tutorial/Fun_with_Rovio/slide010.php
http://www.roborealm.com/tutorial/Fun_with_Roomba/index.php
http://www.roborealm.com/tutorial/Fun_with_Surveyor/slide010.php

which also use the joystick module and have to scale that value.

STeven.
Anonymous 13 year
It is better to use Packetized commands vice trying to parse the direction and speed components. Just remember to send the "AA" byte to wake the controller. I've had very good sucess with this.
Mark from United States  [2 posts] 13 year
Thank you Steven, I'll try it and let you know if i have any troubles

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index