Repeating button press

Hi.
A complete newbie here But liking the challenges.
I am making a balancing robot controller.
The control need to send a continuous stream of data if a button is pressed. and send nothing if nothing is pressed.
have read a few topics on this and it sounds like each read of the button requires a timer.
like this one [https://groups.google.com/g/mitappinventortest/c/NV8ijj25Dgo] But I have no idea on what or how to implement it.
My version so far. Auto_connect.aia (280.9 KB)
I am hoping that the download is done as it should be..
All is working as it should except the continuous button press.

Any help that explains what it is I am supposed to be doing to fix my coding issues.
Regards Antony

Try this (Clock.TimerInterval = 100 or 50):

grafik

Here's my take on this ...

Auto_connect_ABG.aia (282.4 KB)

Hi.
Wow thanks for the quick reply's.
Will have a look into both methods tomorrow when I am more awake.
Thanks Anke.
Thanks ABG.

Thanks again.
Anke you typed" Try this ( Clock.TimerInterval = 100 or 50 ):".
I am not understanding this. Is it something I can adjust for the timings ??
I get continuous sends of all directions. IE 1,2,4,8. which repeat every 1 second.

ABG's is work fine thanks :slight_smile:
both are sending the BT transmission at 1 second intervals. This is to slow to control the Balancing robot.
Is there ay way to increase the transmission rate ??.

Many thanks
Antony.

As I said: Set the Clock.TimerInterval = 100 or 50

grafik

grafik

Hi.
Thank you That worked.
Auto_connect_Anke.aia (281.9 KB)

Thank YOU so much.
Antony.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.