I tried using a robotic car "Maqueen" that extends micro: bit provided by DFRobot.
Boards and tires with sockets and geared motors to insert micro: bit and battery case (single 4 ✕ 3) and ultrasonic distance meter HC - SR 04 were included.
- Insert the tire into the motor
- Paste double-sided tape on battery case
- Insert the battery connector into the board
- Fix the battery case to the board with double-sided tape. Plug micro: bit into socket
Completion Something cute! There is also a connector that inserts an ultrasonic rangefinder in the front.
- Front red LED, full color LED mounted
- Infrared reception sensor mounted
- Buzzer mounted
- Equipped with photo reflector for line tracing
- Ultrasonic sensor interface installed
Since it is a robot car that extended Micro:bit, it can block coding with MakeCode.
How to add Maqueen block
- Please access below and click "New Project"https://makecode.microbit.org/
- Click the setting icon -> Extension
- Enter the following library link and click Search
https://github.com/jhlucky/maqueen
Click on maqueen to install
- Maqueen's block is added.
You can now code Maqueen with MakeCode.
Sample code for MakeCodeVarious MakeCode sample codes for Maqueen are uploaded below.
- Motor control basic programhttps://makecode.microbit.org/v0/06010-26123-14565-76380
- Full color LED control programhttps://makecode.microbit.org/v0/69610-55057-29165-54269
- Red LED flash & buzzer output programhttps://makecode.microbit.org/v0/18009-58813-58076-35023
- Ultrasonic rangefinder basic programhttps://makecode.microbit.org/v0/12620-11477-21550-69385
- Infrared reception programhttps://makecode.microbit.org/v0/08425-65289-80548-62746
- Line tracehttps://makecode.microbit.org/v0/04003-70686-49203-10023
- Ultrasonic sensor obstacle avoidancehttps://makecode.microbit.org/v0/39316-36871-34994-71611
I tried the sample code of the line trace. This code controls the motor by sensing black lines with two photo reflectors on the bottom front of the board.
I merely tried running the magic line on the paper.
I wrote a larger course. As it is a sample, the speed is a bit faster so I change the PWM output to the motor from 255 to 25 so that I can run late.
Comments