I am newbie to BOLT,html,JS please help me out.
I wrote this two codes.
I interfaced 3 leds with BOLT at pin1,2,3 but only led on pin3 glows on pressing LEDON button.
I am newbie to BOLT,html,JS please help me out.
I wrote this two codes.
I interfaced 3 leds with BOLT at pin1,2,3 but only led on pin3 glows on pressing LEDON button.
Hi,
Use the command /digitalMultiWrite?pins=1,2,3&states=HIGH,HIGH,HIGH
Yes.That will work!! Thanks
Whoa , never knew that was possible. Well, you learn something new everyday.
Can’t wait to try things with the parameters.
We are publishing new features to bolt with each update. We shall soon setup a formal way to commincate the updates. Meanwhile try this if you haven’t : http://cloud.boltiot.com/apiDoc
The code initializes the pushbutton pin and LED pins in the setup()
function.
In the loop()
function, it continuously checks if the button is pressed. If it is, it toggles the state of the LEDs (turns them on if they are off, and vice versa).
The boltiot.digitalWrite()
function is used to control the LEDs on the Bolt Cloud, ensuring synchronization between physical LEDs and virtual LEDs. The delay(200)
is a debounce delay to prevent rapid toggling when the button is pressed.