CytronTechnologies / pxt-zoombit

Cytron ZOOM:BIT Robot Car Kit for micro:bit
https://cytrontechnologies.github.io/pxt-zoombit/
MIT License
0 stars 2 forks source link

Zoombit for Python ? #3

Open nhannn87dn opened 3 weeks ago

nhannn87dn commented 3 weeks ago

Zoombit for Python ? Have module Zoombit for Python ?

https://python.microbit.org/

kiate commented 3 weeks ago

Hi, you can find the MicroPython libraries for REKA:BIT at this GitHub repo. REKA:BIT is the micro:bit expansion board used on the ZOOM:BIT robot.

You may open the sample .hex file (unzip) attached in https://python.microbit.org/ for reference. ZOOMBIT-mPy-Line Following.zip

nhannn87dn commented 3 weeks ago

Thanks you so much !

nhannn87dn commented 3 weeks ago

Hi !

  1. In mico:bit Python Editor, How to flash RGB LED continuously while listening for button press events like on makecode.org.
  2. How to Control: HeadLights, Ultrasonic

Can you show me ?

kiate commented 2 weeks ago
  1. It depends on your desired RGB LED flashing patterns. You can take a look at the reference on how to use Buttons in the micro:bit Python Editor. Since Python doesn't have Event Triggers like what we have in MakeCode, you will have to check the button press and change RGB LED colors all inside the same while True: loop of your program.

  2. You can refer to Digital IO for controlling the Headlights. Change the output pin numbers to the ones connected to Headlights on your ZOOM:BIT. For Ultrasonic, you can add this MicroPython library to your project and call the functions based on the examples there.