Example Suggestion

About Forums Forum Suggestions Example Suggestion

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #580

    Thanks for all the great examples, but for a beginner like me, it’d be helpful to have a super-simple example where a single button on the webpage makes something happen on the breadboard, like turning on and off an LED.


    Have you looked at Breakout/examples/getting_started/hello_world.html. All this uses is an LED and button. It will still work even if you don’t wire up the button.

    To turn an LED on or off you can use the on() and off() methods of the LED. For example, you can change line 63 of the hello_world.html example to:


    and then after a delay (using setTimeout) turn it off using:


    If you want to blink or fade an LED at a regular interval, then it is best to use the blink() method and pass a waveform as illustrated in the hello_world example.


    Yes, I have, but that example uses a button on the board, which I think doesn’t illustrate (as well) the interactivity between the input (web page) and the output (board). The hello_world example is input (board) and output (board). Follow?


    I see. I can add something like that to the next release.


    You will now find a simplified hello_world.html example as of Breakout_v0.1.3.beta release.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.