I made a LED control using a timer, to turn on it can be with a timer while it can't turn off. so the LED stays on when the time is 0
Are you using Arduino?Bluetooth? Show the blocks of your app.
It is not a good option to use two Screen in the Bluetooth connection, use virtual screens.
my problem is bluetooth not sending 0 after time shows 0
You have some type mismatches that cause problems:
-
n = false in one place, n tested for 0 in another. Use default 0 ?
-
N1-n4 returned from TinyDB default value as ' ', then tested against 0. Use default 0 instead.
Hello Muhammad
Next time you upload an image of your Blocks, please use the App Inventor function for this purpose - your Screenshots are difficult to read.
Right-mouse in the Blocks work area and select "Download Blocks as image"
This is wrong, the List is already populated:
You can do this:
This is also wrong:
-
You can't enable Clock1 Timer there, the Timer has to be already enabled to run anything in it's 'when' Block.
-
What is the variable 'n' for exactly?
-
Before sending, you must check that the Client is connected.
-
Does this Timer only get fired once or should it keep on sending the value 48 until enabled = false?
-
The other Clock Timers - what are they for?
for number 1 it has been deleted, and for number 2 n it is a variable for the countdown timer, and for problem number 3 how to check the client is connecting?
for number 4 I saw in many tutorials to turn off using the value 48
for other clock timers because there are 4 countdown calculations
ok i will try it
i have problem with When the slider in the app is moved an error appears "Error 515: Not connected to a Bluetooth device".what's the solution?
That's better, though the Timer should disable itself after the BT send and 'n' has no effect at all.
So like this:
Other Time count downs - you have other LEDs?
yes, i have another led. the first led can countdown timer but after I add another led can't run the countdown timer. only the first one runs.
Change both Clock Timer Blocks to the code in my example - that would at least give you valid code - how do you trigger the Clock Timers? With Button Clicks?