Buttons are widely used in everyday life,there are two buttons on the left and right sides of the LED array on the board, which make it more easier to IoT application, or even can be used as game joystick or be used in smart home.
Open Webduino Blockly Bit experimental version, place the “development board” block to edit area, the development board uses simulator by default, connect with virtual Bit board as shown in the picture, the preset Device ID is 1234
Development board related blocks are in the “development board” menu.
To use physical Bit board, please choose the “Wi-Fi” in the drop down list and enter the corresponding Device ID.
Place two “set button as switch” blocks to the edit area, choose button A or button B in the rear drop down list, and in the front drop down list choose “new varible” and name them as btnA and btnB accordingly.
All the button related blocks are in the button switch menu.
Click the webpage interactive menu on the upper right to open web interactive area, choose “display text” in the drop down list, and corresponding blocks are available on the left side.
Place “when button is pressed” block to edit area, choose btnA or btnB in the drop down list, set the text ”A is pressed” to display in the webpage interactive area when btnA is pressed. And likewise, set the text “B is pressed” to display when btnB is pressed.
Display blocks are in the “display text” menu, text blocks are in the menu of “basic function>text”
Press the red button on the upper right to run,the corresponding text will display in the web interactive area when click the button on virtual board or press the button on the physical Bit board.
Button to control RGB LED matrix
Besides interaction with web page components, buttons can control other components on the board. Let’s demo with a full color matrix interaction. Pressing different buttons shows different pictures on the LED matrix. Place the full color matrix block to edit area, set the name to matrix, and then place two button blocks and set the names to btnA and btnB.
Place “when button is pressed then run” blocks, and set different pictures to btnA and btnB separately
Press the red button on the upper right to run, different pictures will display when click button on the virtual board in simulator or press the button on physical Bit board
How to get Webduino Bit
Buy Webduino Bit：Online Store
Email to：Customer Service Email