Asked — Edited

Button Release On App

Does anyone know how to have a directional servo stop when a button is released on the phone app? i can do this when i press the arrow keys on the desktop but can't seem to figure a way to prevent the phone app from locking in a direction when letting go of the button. I have to press stop. Any ideas? Thanks.


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

PRO
Synthiam
#1  

There is no on release for buttons on the mobile app.

By "directional servo", you may mean "continuous rotation"? If so, use a joystick pad or servo pad control. Otherwise, a start and stop button may be used.

#2  

Thanks, can the joystick be used to drive the continuous rotation servos in 2 different directions to turn?

PRO
Synthiam
#3  

You bet - and controls the speed.

The center (90 degrees) is the center of a continuous rotation's STOP position. The further you move away from 90 degrees in either direction controls the speed of the continuous rotation servo in that direction.

100 < - Turning left faster 99 98 97 96 95 94 93 92 91 < - Turning left slower 90 <- Stopped 89 <- Turning right slower 88 87 86 85 84 83 82 81 80 < - Turning right faster

Set the servo pad so the center of the max and min value is 90

Adjust the POT on the continuous rotation servo to ensure it indeed stops at the 90 degree position

Also, if you are using the continuous rotation servo for wheels to steer the robot, it would make most sense to use a Continuous Rotation Movement Panel. This way you can use the software's advanced movement features. More information can be found in the learn section or by pressing ? (question mark) on each control to read the specific manual page. Here's direct link to the continuous rotation movement panel: https://synthiam.com/Tutorials/Help.aspx?id=12

Here is a direct link on how to adjust a continuous rotation to STOP at 90 degree pwm: https://synthiam.com/Tutorials/UserTutorials/190/1

Lastly, here is how a servo works: https://synthiam.com/Tutorials/Lesson/48?courseId=6

#4  

Is there a continuous rotation panel on the mobile app?

PRO
Synthiam
#5  

Continuous Rotation Movement Panel is a movement panel, and is not displayed in the App. Mobile Apps are interfaces, not controls. A continuous rotation Movement Panel is a control. The app will therefore use either the Movement Joystick or EZ-Script commands "Forward(), Left(), etc)" to control the movement panel.

A Movement Panel is how your robot moves. You can have one Movement Panel per project. If your robot uses 2 continuous rotation servos with wheels, then add a continuous rotation movement panel, as linked to in my previous response.

Once you have a movement panel, then you can begin using EZ-Script commands for movement and other controls for movement, such as camera tracking, etc.

The learn section has more information than i can write in a response:D

PRO
Synthiam
#6  

To expand on what i'm writing...

If you have a Movement Panel added to your project, then Movements are not universally controlled by any control. This means that if you have a Movement Panel (of any kind), then any other control that wants to MOVE the robot can do so because they know how. This happens magically in ARC.

So, if you have a Continuous Rotation Movement Panel added to the project, then you can use EZ-Script commands such as Forward() or Stop() or Left(). You can also have any other control that controls movement.

#8  

I got the joystick working in the mobile app with the continuous rotation panel, but turning is a chore. On the desktop, turning with arrow keys works like a charm. Can I build buttons that behave the same way in the mobile app? As in move forward when pressed but stop when let go?

PRO
Synthiam
#9  

If you wish for quicker turning, either disable the speed control on the joystick or use movement buttons, as in the tutorial i posted above. Here's a screenshot of the section i'm referring to for reference...

User-inserted image

There are blue question marks beside the options which explain what they do. For example, to disable speed control on the joystick.

Have fun!

#10  

I still have the problem of button not releasing right or left till I press stop. I have tried the joystick with no speed control but hitting it directly on left or right is difficult. If I could duplicate the keyboard arrow function it would be perfect!

PRO
Synthiam
#11  

Again, there is no OnRelease on the mobile app.

You may also change the sensitivity of the joystick pad with speed control disabled if you wish to customize the behavior.

Have fun!