How do I turn mutilple LEDs ON using single 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 , Please send your code to rahul.singh@inventrom.com

1 Like

Hi,

Use the command /digitalMultiWrite?pins=1,2,3&states=HIGH,HIGH,HIGH

3 Likes

Yes.That will work!! Thanks :slight_smile:

Whoa :open_mouth:, never knew that was possible. :smile:Well, you learn something new everyday.
Can’t wait to try things with the parameters. :wink:

4 Likes

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

2 Likes

@PPV

Information provided through the link is awesome :grin:

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.