HomeRaspberry PiBuilding robots with ELECFREAKS

Building robots with ELECFREAKS

micro:bit and RP2040

Robotic kits are a great way to get your offspring hooked on programming and turn their interest toward STEAM. This time around I had been sent 2 kits from ELECFREAKS: RP2040 based Pico:ed and micro:bit based Smart Cutebot – a great selection of microcontrollers supported by BBC and RaspberryPi Foundation. It’s a great way to fill a void caused by general shortages of Raspberry Pi boards.

Ring:bit V2 Car Kit for Pico:ed (RP2040)

ELECFREAKS Store $35.80

Ring:bit V2 Car Kit with Pico:ed board and Car Accessories Kit

This kit requires about 15-20 min assembly and is driven by the Pico:ed platform. ELECFREAKS also included a Ring:bit Car Accessories Kit to customise the robot further. The robot is an autonomous servo-based platform equipped with LED matrics.

The box with accessories (ELECFREAKS Ring:bit Car Accessories Kit $16.90) brings:

  • Sonar:bit
  • LightBar
  • Tracking Module

These can be added to the car – one at a time and connects via an expansion board to the RP2040 module. Adding these to a car takes only a couple of moments and will expand the base model’s capability.

In case you are more familiar with micro:bit, you can also use that board to drive the kit as Ring:bit V2 Car Kit is compatible with both: RP2040-based Pico:ed and the micro:bit.

The assembly is very straightforward and it will be suitable for kids too. Making these yourself is a big part of the experience, especially when you see it powered on and working correctly. Just don’t expect it to move just yet, you will need to sit down and program it before the robot does cool things.

Programming

To program the RP2040, you can use Thony (microPython) or take advantage of the visual programming with MicroBlock with support for C++ as well. Unfortunately, the documentation about MicroBlock and C++ is lacking, and I couldn’t find an official setup guide. With a little patience, you will be able to figure out the MicroBlock and visual programming but the entire programming guide for this robot is for Micropython and Thonny (recommended IDE by Raspberry Pi for their RP2040 platform). PR source confirmed they will be adding more documentation in the future.

It’s possible, however, to swap the Pico:ed board with micro:bit and continue with MakeCode instead.

I really liked the small cards attached to Ring:bit Car Accessories – presenting the sensor’s function but also providing you with a reference sample of visual programming. It’s a small visual aid, but comes extremely handy as a teaching tool, as you don’t learn as much by simply importing a ready project.

MicroPython

The challenge here goes up based on your skills. Basic programs and scripts to try are well defined in the online documentation. What’s really good about the online knowledgebase is how well described individual modules are including showcase videos, reference info and code samples to try it out in an instance.

It gives you enough information to load the program quickly, check if everything is working and then use the data provided to create your personal take on the project. As the main board uses RP2040, programming follows the usual ways of programming Raspberry Pi Pico-based development boards.

Just a quick start tip – unlike a regular Raspberry Pi Pico, Pico:ed board uses code.py as your default script (instead of main.py) this will allow you to run the examples by default. Just save them on the board instead of your local computer and they will launch on power on.

Smart Cutebot (micro:bit based)

ELECFREAKS Store $34.90

Smart CuteBot

This robot comes almost fully assembled. You’ll have to stick a BBC micro:bit board on it (sold separately), plug the ultrasonic sensor (HC-SR04) add the battery enclosure. With minimal assembly, you are ready to get started in a minute. A follow track is included in the box if you fancy trying your skills in autonomous programming.

If that’s not enough, ELECFREAKS offers different expansion boards on top of the already included (line sensors, IR receiver) thanks to expansion sockets located on the main PCB. These bring extra display, batteries, LED arrays and LEGO integration to expand the platform further. In a similar vein to the previous robot, Smart Cutebot can be also driven with an RP2040-based controller Pico:ed.

Unless you got extra kits, you will skip the assembly and jump straight into programming this robot. It’s likely that the micro:bit board purchased by you, has a test program loaded and it has no idea how to drive the robot just yet.

Programming

Thanks to rich support for micro:bit boards, Smart Cutebot can be programmed with MakeCode (visual programming) JavaScript, microPython and C++ – offering an educational experience in the most popular languages for embedded devices. Visual interfaces of MakeCode ease the youngest into programming logic breaking down complex tasks into easy-to-understand actions simulated by blocks. Apart from autonomous control, direct remote control is also possible thanks to micro:bit’s Bluetooth and infrared.

JS/MakeCode

MakeCode – simple to use JS-based visual programming

Programming micro:bit is very easy. You can do it in a web browser (sample code) and the MakeCode page will load the sample of the code in a visual interface (blocks) with a ready-to-edit script. From there you can simply edit block’s values or switch over to JavaScript and access a more traditional IDE interface.

A modified and compiled sample is available as .hex file which can be uploaded to your robot via USB cable. Simply follow the procedure described in this manual to set it up and start testing things out. To speed things out – you can also authorise a web client to access USB and upload your code directly to your Smart Cutebot. It will speed things out and save you an extra step.

MicroPython

If you want to work with Python instead, pick an IDE of your choice – ie: Thonny and create/download/edit sample code there or use the Python uploader/editor to communicate with your robot (link to docs).

Programming micro:bit alone is a fun idea thanks to the sensors and inputs available on this microcontroller. With a robotic platform like Smart Cutebot, you can expand on that quickly and add flair to your programming logic. It’s one way to verify your code works via simulation, but to see the robot behaving (or not) is very satisfying (and helpful) when testing your code for bugs and logic issues.

But most of all, platforms like these are very engaging. Flashy lights, sounds and silly animations can attract kids’ attention for a long time and sneakily introduce the basics of logic and programming through fun.

Final thoughts

While Raspberry Pi boards are hard to source at usual prices, robotic kits like these from ELECFREAKS are a great alternative to start your journey into programming without paying scalping prices for boards. Both micro:bit and RP2040 microcontrollers are well supported which assures the longevity of the kits and a rich library of samples to try new ideas. If you ever wanted to introduce kids (or yourself) to programming – working with robots is probably the best way. Let me know what you think in this Reddit thread.

🆓📈 – See the transparency note for details.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

M5Paper

Programable, ESP32 based awesome dev platform with 4.7 e-ink display by M5Stack

More HATs

client-image
client-image

Argon One M.2

Enclose Raspberry Pi 4 inside this great case with custom I/O, cooling and GPIO and M.2 SSD support

More cases on

client-image
client-image

Best Raspberry Pi Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

Slow Internet Warning

0
From time to time my Internet grinds to a stop. Since Raspberry Pi 4 comes with a 1Gbps Ethernet, I decided to take advantage of it and create a reporting system in NodeRED that will monitor and report when the ISP is not keeping the contractual agreements. Works with Alexa, Google Home, Android and Windows 10.

How fast Raspberry Pi NAS is?

0
Let's see how fast Raspberry Pi NAS really is?

Argon18: Argon ONE SSD modification

0
Argon One case just got better - now you can boot it from USB without ruining the design thanks to Argon 18: Argon One SSD modification

HOW TO...

How to boot Raspberry Pi 5 from NVMe M.2 SSD

0
This is how you can boot your Raspberry PI 5 from NVMe in 10 min! Check out these easy instructions

It took me 2 months to boot CM4 from NVMe

0
Complete beginners guide to Compute Module 4 boot from NVMe.

Raspberry Pi Zero 2 W vs other Zero boards

0
It's time to test the Raspberry Pi Zero 2 W against other Raspberry Pi boards from Zero series: power, WiFi, temperature and core performance

C/C++ and MicroPython SDK for Raspberry Pi Pico on Windows

0
A guide to SDK toolchain for Raspberry Pi Pico and C/C++ , Micropython on Windows.

A comprehensive guide to Grafana & InfluxDB

0
How to use Grafana and InfluxDB on Raspberry Pi for IoT sensors in home automation