Dear blog 🫶 ❤️
This week we have even more progress to report!
In addition to preparing for the mid-term presentation the various members very busy working on different tasks but with a common goal, here are what we have to report:
Jonathan 🧙♂️
Dear blog enjoyers. 👯♂️
It’s 18.09.2023. 🗓️
It’s rainy outside. 🌧️
Our efforts intensify… ⚡
Week agenda:
- Add the new DFRobot Motor Driver to the car, and make it work.
- Add distance sensor to the DFRobot.
- Fork the github master branch.
- Setup the C++ development environment.
- Make the DFRobot to work in C++?
>>> DFRobot Motor Driver DFR0548 <<<
https://wiki.dfrobot.com/Micro_bit_Driver_Expansion_Board_SKU_DFR0548
The DFR0548 motor driver uses the I2C protocol to communicate with the motor servos. Learning I2C is an option, but I might postpone that to later and use the high-level functions contained in https://github.com/aiunderstand/Ada_Drivers_Library for now.
The good thing about I2C and DFR0548 is that all the circuitry is integrated into the board, which allows me to only wire the motor servos to the correct pin slots, flash ADA code with the high-level functions in the above mentioned ADA library, and it works! (See video below 🎥)Each motor spinning forward (using ADA and DFR0548)
I’ve also added the HC-SR04 distance sensor to the car using the ports on the DFR0548. Works flawlessly.
In preparation for adding 2 more distance sensors to the sides of the car, I want to formally allocate the following pins:
- Front distance sensor: Trigger = Pin 0, Echo = Pin 1
- Left distance sensor: Trigger = Pin 2, Echo = Pin 8
- Right distance sensor: Trigger = Pin 12, Echo = Pin 13
The sensors will share 5V VCC power source and GND ground pins through a breadboard on top the car.
Mats 🧑💻
This week I’ve finally reached the Minimum Viable Product state of the simulator, this means one can implement and simulate algorithms with it! Fun fact: Our GitHub repository has had more activity in the last week than all the prior activity combined!
For now I’ve only implemented a right wall following algorithm and an improved version that will re-prioritize directions based on how many times a tile has been visited. Here is a video of it running:
Now everyone will be able to write algorithms by inheriting an abstract Algorithm class with most of the complexity abstracted away, while still having access to info if needed.
And since this is all in the Core library it will be available from the micro:bit Firmware target written using CODAL for runtime and hardware abstraction enabling full code sharing! 😮
I’ve also done a full documentation pass of the repo and fixed some inconsistencies.
For now I’ll focus on supporting all the work towards getting a working robot and work more on tooling if it makes sense and will save development time elsewhere.
I’ll end it with a short poem by me dedicated to another group member: 🌸
It’s not the wrong way
There’s no way it is the wrong way
It was the wrong way.
Iver 👴
This is week 5 of trying to keep up with these guys. It has become obvious that they are on another level than me. Saying that I have been setting up C++ development on my own computer. With great help from Mats, both in person and the great documentation he has set up in github. VSCode should be set up perfectly now.
I have also been helping with the presentation and in general trying to keep up with what the other micro bros are doing.
Next week on Keeping Up With the MicroBros
- The group make more progress preparing to present our work 📽️ 🧑🏫
- More progress with the Robot, hopefully we’ll start working on writing drivers in C++
- Hopefully setup pyocd upload and debugging using Cortex Debug? in VSCode when pressing F5