Asked — Edited

Press Move , Release Stop

Hi guys. Here's what i want to know how to do . I want to make the button on the mobile app to only move when pressed. means , when i release , it will stop moving. instead of click front, it goes front until i press other button or stop.

# Forwards
Set(D0, on)
Set(D2, off)
PWM(D1, 50)
PWM(D3, 50)

here's what i have now. what i need to add to make it work like that ?

p/s: is it possible to use joystick with the app or i still need to get a W8 tablet for it ?


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

United Kingdom
#1  

There is currently no support for cross-platform "button release" events, so you cannot have a "When button is released" on the mobile control buttons. There is a slightly different way that you can use that might be helpful.

In an EZ-B connection script, you can add the following variable...

$pressed = 0

Then, when configuring a mobile button, add the following script...

if (!$pressed)
# Forwards
Set(D0, on)
Set(D2, off)
PWM(D1, 50)
PWM(D3, 50)
$pressed = 1

ELSE
# Stop
Set(D0, on)
Set(D2, off)
PWM(D1, 0)
PWM(D3, 0)
$pressed = 0

endif

What this does is to act like a toggle switch. Press the button once and the robot will move forwards. Press the same button again, and it will stop. Not a button release like you're looking for, but it is a workaround of sorts. I don't think you can link a joystick to the mobile interface, at least there's no ControlCommand() options for it. And you don't need a W3 to use the mobile control as it's mainly designed to be used with iOS 7.0 (and up) and Andriod 4.1 (and up) Smartphones and tablets, but the Acer W3 will give you full ARC control if using the Windows ARC software.

https://synthiam.com/Products/ARC

Hope that helps.