Hi everyone,
I have a problem with making APP to run correctly,
I have my C8051F380 getting "chars" from the APP, I need to make a loop of button being "Touched Down" and inside of it making a loop of maybe "while loop" so it will continue to send via Bluetooth text, (same text) as long as the button is pressed.
In C8051F380 program I have a condition of "while I getting x via Bluetooth, checking distance" with ultrasonic.
AI2 does not support delay procedures like you would find in low level devices.
Instead, have a Clock (from the Sensors Drawer) periodically cycle through whatever global variables or Button attributes (Bold, background color) have been set by your button Touchdown and TouchUP events for the Clock Timer event block to know what to send.
Hi ABG,
Thanks for the quick response,
but I didn't really understood you, I have (I think) global function for a delay, using a clock (from the Sensors Drawer) how I can do a loop now in "when Button1.RouchDown" ?
(I haven't figured out how to get Loom to record my PC speaker output yet, and I don't have a microphone attached to my PC, so the video is unfortunately silent. Run the demo on your own setup to hear the beeps and boops.
This is NOT a Block Method, what is shown in these Blocks is a renaming a Clock component. Not a very good idea to use this ad hoc delay Procedure. See Taifun's comments regarding avoiding delay procedures like this.
Perhaps this is easier to understand. I use a label instead of a bluetooth send text, you can see in the video the 1's being sent while button is held down, then a 0 when button released. This is using a clock interval of 1 second.