CircuitPython slithers onto a new board, but this board looks a bit familiar!
If you like what you read...
So what is it?
Serpente is a tiny CircuitPython prototyping board from arturo182 on Tindie.
It looks very similar to an ATTINY85, which is why I picked up two of them from arturo182 store.
I bought a USB C version, here next to a micro USB ATTINY85 for comparison.
And I bought a USB A version, again next to the equivalent ATTINY85.
The pinout for Serpente is almost the same as an ATTINY85 but each of the 6 GPIO pins are both analog and digital! We also have SPI and I2C as well as 2 serial ports. All of the pins are PWM too! From such a tiny board.
So why is this better than an ATTINY85?
Press the button (under my finger) and the LED blinks three times. All written using @CircuitPython and references made to @adafruit great CircuitPython resources https://t.co/NS9yZ4MJ20 written by my friend @kattni pic.twitter.com/gduAyULvJH— biglesp (@biglesp) September 25, 2019
Firstly it is a lot easier to use. As it uses Circuit Python we can use a code editor such as Visual Studio Code or for those new to coding we can use Mu which comes with CircuitPython compatibility baked in! and using these editors we can write code directly to the board as if it were a USB flash device. Just save some code as
code.py and Serpente will reset and run the code.
Secondly Serpente is much more powerful when compared to an ATTINY85.
- AVR MCU, 8K FLASH, 512B RAM, SPI.
- Controller Family/Series:AVR Tiny.
- Core Size:8bit.
- No. of I/O's:6.
- Program Memory Size:8KB.
- EEPROM Memory Size:512Byte.
- RAM Memory Size:512Byte.
- CPU Speed: 8/16 MHz internal clock, up to 20MHz external clock.
- ATSAMD21E18A 32-bit Cortex-M0+ running at 48MHz
- 256KB flash and 32KB RAM
- 4MB Flash for storing files and CircuitPython code
- 6 highly customizable GPIOs
- 250mA LDO
- 3.3V logic and power
- Powered either from USB or external source
- User-controlled RGB LED
So what did I do to test it?
I made a quick and simple button and LED project.
You press the button and the LED will flash for a certain number of times.
Here is the code.
import board from digitalio import DigitalInOut, Direction, Pull import time led = DigitalInOut(board.D0) led.direction = Direction.OUTPUT button = DigitalInOut(board.D1) button.direction = Direction.INPUT button.pull = Pull.UP while True: if button.value == 0: for i in range(10): led.value = True time.sleep(0.2) led.value = False time.sleep(0.2) time.sleep(0.1)
And here is the circuit that I built. Many thanks to arturo182 for the Illustrator file.
So is it any good?
New toy alert! @arturo182 Serpente board which looks like an #ATtiny85 digispark... But it runs @CircuitPython— biglesp (@biglesp) September 25, 2019
There will be a blog post covering this on Monday! #microcontrollermonday
Oh and it is Mu compatible! pic.twitter.com/Tt3FScpftf
Yes! I have quite a few CircuitPython boards, from Gemma M0 to the PyPortal. But the Serpente is a good buy. We have enough GPIO pins and they offer so many different options (analog, PWM, I2C, SPI, Serial) that we can drop this tiny board into a project and let it do many different things. Much more than the humble ATTINY85.