Posts

Showing posts with the label Anastasia

The micro:bit is talking to the VL53L0X ToF sensors!

Image
This chip is no more :( This morning I got my Arduino sensor driver talking to a micro:bit using SPI. The Arduino Uno runs at 5 volts, and the micro:bit works at 3v3, so I used a level shifter to connect the two. My first attempt failed disastrously. The level shifter I used was based on the TI TXB0108. I managed to connect the 5v power and inputs to the 3v3 side, and I fear the magic smoke has left the chip. It's a shame, as the board was my first attempt at soldering SMD devices. It's been sitting unused in my bits box for a few years, though, so it's not the end of the world. Fortunately I had an Adafruit level shifter breakout based on the same IC. It's well laid out with very clear pin markings and I managed to connect it correctly. The replacement worked perfectly and the micro:bit MicroPython code was very straightforward. I've listed it below, and it's with the other code on GitHub . from microbit import * import struct from time imp...

SPI access to multiple ToF sensors is working

Image
I've been ploughing through the steps towards my goal of connecting multiple distance sensors to Anastasia's micro:bit. I now have a pair of Arduinos connected via SPI, with the slave reporting distances from two VL53L0X sensors. The wiring is a mess and the code needs cleaning up. But it's working, and replacing the Arduino master by a micro:bit should be pretty straightforward. I'll report on progress. The code is on GitHub .

Build details for Anastasia

Image
I've uploaded pdf files with full build instructions for Anastasia the micro:bit robot and the power strip I made for her. These are free/immediate downloads, no email required. Links: Build Anastasia the micro:bit robot Power Strip Build Guide

Bill of Materials for Anastasia - build instructions coming soon.

Image
I've added a Bill of Materials for Anatasia the home brew micro:bit robot in her GitHub project . They are in the project README. I'll add building instructions here and on GitHub over the week-end. Meanwhile, here is a video showing her in action:

Driving Anastasia's Kitronik motor controller via radio

Image
Anastasia with the controller This is the fourth in a series of articles about Anastasia - a home-brew robot based on the micro:bit. In my previous post I shared the micropython code that runs on Anastasia's remote micro:bit controller. The controller can send one of five commands to Anastasia : stop applies a brake to the motors. left spins the robot anti-clockwise. right spins the robot clockwise. forward ( you guessed it1) drives the robot forwards. backward also does what you'd expect. In this post I'll step through the code than implements these commands on Anastasia. The code looks for incoming radio messages. It translates those messages into methods on a Driver class. These methods then send control signals to the  Kitronik motor controller. Here's Anastasia's code The code starts with the necessary imports, and then begins the definition of the Driver class. from microbit import * import radio class Driver: "...

Controlling Anastasia from a second micro:bit

Image
This is the third in a series of four articles about Anatasia, a home-brew micro:bit based robot. Here's the full list of articles: 1. The original article introducing the robot. 2. A short update when I released the code on GitHub. 3. This detailed walk-though of the controller code. 4. A detailed walk-through of the code that runs on the robot .  The code for Anatasia and her controller is finished. It's simple and it's all working well. You control Anastasia via a separate hand-held micro:bit, which communicates using the micro:bit's built-in radio. You tilt the controller and Anastasia responds by advancing, retreating or spinning to the left or right. Anastasia stops when you hold the controller level. Here's the controller code: Controller Code   The controller code starts with a bit of set-up from microbit import * import radio radio.on() # The critical value for tilt detection. # A lower value makes the controller more sensitive. ...

Anastasia is a simple home-brew robot - now on GitHub

Image
Anastasia V1 Anastasia (my latest home-brew robot) is now on GitHub . The code is described in a series of articles on this blog. I've listed them at the end of this post. I've made rapid progress with Anastasia and will do more work on her today. Anastasia is currently driven by a pair of micro:bits. The motor is managed by an on-board micro:bit connected to a Kitronik motor controller and I control Anastasia over radio using a second micro:bit. Anastasia is working, but needs some minor enhancements to the code and electronics. I may also need to replace the motors which run a bit unevenly. Once I've done the upgrades I'll post a video of Anastasia in operation. Soon I'll replace the on-board micro:bit by an Adafruit clue which will be controlled via Bluetooth. Eventually I'll add an on-board camera. Articles in this series: 1. The original article introducing the robot. 2. This short update. 3. A detailed walk-though of the controller c...