My students are creating a program that uses the concepts learned in the entire unit 6 to create a new program/game. One of my students has a fighter plane that shoots laser beams out of it and they move up the screen. He wants to use the left button and the right button on the circuit playgound to to get the color leds to light up one at a time (kind of like a countdown) and then when you let go he wants the lasers to shoot on the screen. Is this something he can do? If so, how?
I think you have to use a setInterval command to make a function get called every so many milliseconds.
Here is a little sample project that turns lights on when the button is down and then turns them off when the button is up.
Its not exactly what the student wants but its a start.
Let me know how it goes