Since the previous update, we have been busy writing software day and night (literally) to maximise the amount of projects that can be done with the Robo HAT MM1.
- MPU9250 Python Driver
- Donkey Car Compatibility
Let’s start with CircuitPython…
Quoting Adafruit’s Documentation and Learn Website:
CircuitPython is an education friendly open source derivative of MicroPython. CircuitPython supports use on educational development boards designed and sold by Adafruit. Adafruit CircuitPython features unified Python core APIs and a growing list of Adafruit libraries and drivers of that work with it.
CircuitPython adds hardware support to all of these amazing features [of Python]. If you already have Python knowledge, you can easily apply that to using CircuitPython. If you have no previous experience, it’s really simple to get started!
The CircuitPython repositories are all open source and maintained by Adafruit. At the moment, mostly only Adafruit boards work with CircuitPython. That is about to change!
We have spent the last few weeks successfully adapting the CircuitPython library to work on the Robo HAT MM1. It is able to control Servo Motors, communicate with external sensors (such as IMUs, pressure sensors, light sensors, etc) and most of all - be able to run independently of your computer’s software. CircuitPython runs directly on the board itself! This means that you could build all your software to control a robot arm in Python (no more C++ required like Arduino).
The education potential is very great for the Robo HAT MM1 with the assistance of CircuitPython.
We think this is an amazing library and are very happy to have ported it to the Robo HAT MM1 for people to use.
Quoting Adafruit’s Documentation:
Seesaw is an open source microcontroller friend for other chips. It provides a variety of capabilities such as UART, ADC, DAC, extra GPIO, etc. to chips that don’t have them.
SeeSaw can be partnered with a Raspberry Pi to form a powerful combination. The Raspberry Pi can do all the hard calculations for your robot (such as neutral networks) and then send all the control commands to the Robo HAT MM1 through I2C running SeeSaw. SeeSaw has so many special functions built into it. Some of these include: 16 Bit Servo Control (much higher than normal 8 Bit or common 12 Bit), 12 Bit Analog Read, USB-Serial to UART for communicating with the Raspberry Pi via USB, and more.
This is another great library from Adafruit Industries. This library will help everyone to create great robotics projects, without the complexity of writing lots of code.
As stated in our specifications for the Robo HAT MM1, it includes a MPU9250 IMU that contains an accelerometer, gyroscope and magnetometer. This is the most accurate consumer grade IMU you can get (according to a few sources).
We did not realize is that this particular chip does not include Python (and more importantly CircuitPython) support. There were only a few limited libraries available for this chip - none were in Python.
We decided to write a CircuitPython library for the MPU9250 to give support for others to use this chip in the future.
This has now been completed and tested with CircuitPython. We can report that it works very well but will be improved and tested further in the future. Stay tuned!
The Donkey Car community has always been very supportive of this project. We have always wanted the Robo HAT MM1 to work with their ecosystem to help bring more self-driving cars to the world.
We started work using SeeSaw + Robo HAT MM1 + Donkey Car to bring support. We have now successfully been able to drive Donkey Cars around with the Robo HAT MM1. This means that the PCA9685 Servo Driver is not required to use Donkey Cars and it can be done exclusively through the Robo HAT MM1.
Next steps will be to implement the radio control remote to drive and capture data for the Neutral Network without the need for the web control app.
Overall, there has been a lot of software developed for this project with much more planned in the near future! Stay tuned for more updates.