Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by Dunning-Kruger!

Mobile App Button Press To Ezb

Good Evening,

I am looking for some help with a way to use the mobile builder "Add Button". I see the script window, and it needs script, how can I use the button press as an input to my script? Does anyone know?

Thanks.:D


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!

#1  
When the button is pressed, what do you want it to perform ?

I use six buttons to turn on and off motors in a Roomba.
United Kingdom
#2  
As @Doc says, what do you want the input to be? Do you want to start something? Do you want to set a variable? We need more information to help you.
#3  
What ever you write in the script attached to the button will execute when you press the button.... So you kind of answered you own question...
#4  
@All : Yeah I did answer my own question. Let me see if I can explain a little better. My original thought was to store the amount times the button was pressed and store that into a variable, and use that variable into another script.
#5  
Variables are global (meaning they hold their value everywhere in your program including other scripts) so this would be very easy... Every time you press the button in the scrip behind it do something like below as your code...

Code:


$buttonPress=$buttonPress+1


Every time you press that button, 1 is added to the variable $buttonPress counter
United Kingdom
#6  
Even less typing...

Code:

$ButtonPress++
#7  
Ok. That is truly easy. Thanks to you both Richard R and Rich.