Community Question

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.


User-inserted image
Robot Doc
Commented September 2014
Rich provided a code example to solve this question. Scroll down to see it.
DJ Sures
Commented September 2014
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.
MovieMaker
Commented September 2014
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!
Robot Doc
Commented September 2014
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.
Rich
Commented September 2014
The slider is associated with a variable, i.e. $slider1

Use this with SetSpeed()

i.e.

Code:

SetSpeed($slider1)



This is assumption, I have no roomba to try it on (I'm not even on a PC with EZ-Builder either...)

Robot Doc
Commented September 2014
Thanks Rich, your example code was just right so that I could complete the slider button assignment.
Question
AvatarRobot Doc
Asked on Wednesday, September 10, 2014