Hello Everyone on ScratchEd!!!
I wanted the motor to exhibit the following behavior
1. Work only when the Scratch program was running
2. Go this way when the right arrow button waspressed
3. Go that way when the left arrow button was pressed.
4. Stop when both buttons (right and left) were pressed.
5. Stop when both buttons were not pressed.
Hi Dale,
here you have the solution. I've uploaded a video with a robot (helicopter) built by my students that uses the following code.
sites/default/files/helicopter-script.gif
http://www.youtube.com/watch?v=NoYUfLD1Q-E
Frank
Hi Frank,
Great solution! The helicopter is built so beautifully. Thanks for the video demonstration.
M
Hi Dale,
I don't think this will work reliably. The problem is that the keyboard can only send one indication at a time as to which key is pressed, so it will depend on which key was pressed first and when a key is released. I suggest that you experience with controling the movement of a sprite before working on this with the WeDo.
Moti