Asked
— Edited
Resolved by Rich!
While building an Android Mobile app I'm trying to figure out how to use the Slider button to control Roomba drive motor speed. Need some clues.
Rich provided a code example to solve this question. Scroll down to see it.
Does the Roomba Movement Panel work on the mobile yet? I honestly don't know - i'll have to check if it's been implemented yet. Try it and see.
As for setting the speed, you can do so by adding a Slider to the mobile interface and having the EZ-Script use the SetSpeed() command.
Hey Robot-Doc,
You are the absolute expert on the roomba. I just plugged in the cable, put the wires on D0 and selected the roomba Movement and it worked when I hit the arrow keys. Now, on reboot or something like that, I had to play with the button in the top left hand corner. and sometimes the light did not light. It looked like it was off, but Varoom! it controlled the motors. I think that the slider button controlled the speed. I have disassembled the robot so I don't remember.
Hope that this helped. Good Luck, my friend!
Thanks for the clue DJ, I still don't quite understand how the slider control actually will change the Roomba drive speed if the value is set using the SetSpeed() command. If I insert a value (0 - 255) then that single value is used to set the drive speed no matter what position the slider is at. A single button could be assigned to accomplish that. I don't understand how the slider works in this case.
The slider is associated with a variable, i.e. $slider1
Use this with SetSpeed()
i.e.
This is assumption, I have no roomba to try it on (I'm not even on a PC with ARC either...)
Thanks Rich, your example code was just right so that I could complete the slider button assignment.