This repository stores the MicroPython / Python source code for CyberPi programs I created.
To run the code in this repository, you need to:
- Get a CyberPi main control board.
- mBlock 5 on your computer. Please refer to CyberPi Series User Manual to download the required software.
- Some programs in this repository requires network connection to work properly, please use mBlock 5 to configure CyberPi's Wi-Fi connection.
Open the code in mBlock 5 Python editor and press "Run" or "Upload" button base on the programming language used:
Programming Language | mBlock GUI | MicroPython | Python 3 |
---|---|---|---|
Software used for editing | mBlock | mBlock Python Editor | mBlock mBlock Python Editor |
"Run" mode | ✓ | ✗ | ✓ |
"Upload" mode | ✓ | ✓ | ✗ |
Third-party libraries | mBlock Extensions | / | Python libraries |
Operating Systems | Windows, OSX, Linux, Chromebook, Web | Windows, OSX, Linux, Chromebook, Web | Windows, OSX, Linux, Web |
- "Upload" mode : For program which does not require third-party modules and is able to run on CyberPi in a standalone way. Suitable for final product or Offline IoT demonstration.
- "Run" mode: For program which depends on third-party modules like
pynput
,pygame
. Suitable for realtime communication with computers.- A
cyberpi
package bug on version 0.0.7 will throw the errorAttributeError: module 'makeblock.modules.cyberpi.api_cyberpi_api' has no attribute 'get_shield'
when using "Run" to test program. Here is a link that teaches you how to downgradecyberpi
.
- A
Be-careful that the upload operation will override the original program stored at the selected program slot.
For details of how this can be done, Please refer to CyberPi Series User Manual.