Award
Congratulations Rich, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Roomba Drive Speed Using The Slider Control On Android Mobile

Assistance Requested

Help Robot Doc with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

Robot Doc claims to have checked these sources:
 
#1

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

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.


Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


#2

Rich provided a code example to solve this question. Scroll down to see it.

#3

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.

#4

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!

#5

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.

#6

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...)

#7

Thanks Rich, your example code was just right so that I could complete the slider button assignment.