On the Make a Sprite Move and Add Sounds and Costumes pages, we describe how to program a sprite, and on the Program a Device page, we describe how to program a device.
This page describe how to use your hardware device to control a sprite or control your device through a sprite.
Example: interaction between CyberPi and the sprite Panda
1. Connect CyberPi to mBlock 5.
For details, see Program a Device. You can use another device and program it in the similar way.
2. Set the coding mode to Live.
3. Program CyberPi.
Set the operation on CyberPi.
4. Program Panda.
Set the action of Panda.
6. Program CyberPi.
Set the action of CyberPi.
The program is complete.
When you press button A on CyberPi, Panda moves on the stage on mBlock 5.
Keep pressing button A.
When Panda touches an edge of the stage, it goes to a random position and the LEDs on CyberPi are lit up in red for one second.
Comments
Hi, interesting to be able to interact between hardware and computer !
It works well with CyberPi.
But is there a way to interact with an Arduino Uno board ??
Hi Mickael, this question will be better met on the forum, ask it here:
https://forum.makeblock.com/
Thanks!
Please sign in to leave a comment.