A Kitten with Blinking Eyes and a Waving Tail
Make a kitten
Draw the kitten's body and tail on the cardboard, and then cut them out. Use the puncher to make two holes as the eyes of kitten.
Note: the distance of the two eyes should equal to the greatest distance between two LEDs of Halocode.
Connect the servo motor to Halocode (any of the four pins will work), as follows:
Stick the tail to the servo motor. Connect the body and tail of the kitten with Halocode, the servo motor, and the battery box.
Toggle on Upload mode
Script of Blinking Eyes
1. Drag an Events blockand a Control block to the Scripts area.
2. Add a Lighting blockand a Control block . Set the color to white. We want the kitten to blink eyes randomly, so we need an Operators block , and input number 2 and 6. Add a Lighting block and another Control block . Set the time to 0.2 second.
Script of the Waving Tail
3. Drag an Events blockand a Control block to the Scripts area.
4. Add a Pins block servo pin () rotates to () and a Control block . Set the degree to 0 and keep the default time.
5. Add another Pins block servo pin () rotates to () and Control block . Both keep the default value.
6. Click "Upload" to upload the program to Halocode.
7. Check the kitten! Is it blinking eyes and waving its tail at the same time?