I’ve always been a fan of the smaller microcontroller boards such as the Arduino Micro used in the Topsy Turvy Clock and the Trinket used for a Christmas decoration.
But the small size does come with some limitations. In the case of the Trinket the number of pins, lack of USB serial and just 2 PWM pins and one analogue pin. However for small projects it does have a good price and capability.
I’m also used to working in higher level languages such as C# at work so swapping back to C always seems to throw in some gotchas.
So when I heard about the Trinket M0 that got my attention. Adafruit have swapped the ATTiny85 chip with a ATSAMD21E18 which has a whole load more processing power. That allows them to run a subset of Python on the board called “Circuit Python”. This processor has some cool features such as touch sensors, analogue inputs possible on all 5 I/O, USB serial and the ability to run DotStar RGB Leds such as the one attached to pins 7 and 8. It has a lot more ram that the predecessor but that’s quickly used up by libraries.
The process for getting code on the board is a bit different too from the Arduino way. The Trinket appears as a disk drive on your system and you just copy the code and any supporting libraries onto the disk. The Trinket then auto resets and runs your code. However if you’ve used things like the Microbit this should all seem very familar.
The recommended editor is Mu. This is a very minimalist editor with chunky buttons. I’m not a big fan of this style but the board also supports Visual Studio Code and PyCharm. So I’ll be using VSCode for my projects.
So far I’ve used this board on a simple project called “FizzBuzz” which was inspired by the BenHeck team on Element14. I’ve successfully wired up an LCD display and some buttons, so it’s mostly coding to do now to make the game work.
The Trinket M0 does show a lot of promise and I’d definitely recommend it over the previous generation of Trinkets. The option of coding in C or Python does mean that you can use it for a range of projects and the USB capabilities mean that it could become a joystick or keyboard too.
[…] a project I’ve working on, I’m using a Trinket M0 from Adafruit. This tiny board runs a cut down version of Python called CircuitPython which is a […]