Sipeed MAIX is one of the cheapest RISC-V development boards in the world. It is a dual-core module capable of running at 400MHz (can be overclocked to 800MHz) and has Neural Network Accelerators topping at 0.5 TOPS with Tensorflow Lite support. Unable to resist, I backed the Indiegogo campaign and received the boards couple of weeks ago.
One more feature of this $12 super-spec-ed development board is that it supports MicroPython. It was time for a "Hello World" program.
Components
One more feature of this $12 super-spec-ed development board is that it supports MicroPython. It was time for a "Hello World" program.
Components
- Sipeed MAIX Bit development board
- USB Type-C data cable
- Linux Laptop (I used Arch Linux )
The development board has CH-340 chip, the infamous USB-Serial adaptor. So once you connect the USB Type-C cable to your host computer, it will be enumerated as a usb serial device.
Note the QinHeng Electronics HL-340 USB-Serial adapter. That is our Sipeed MAIX device's USB-Serial interface. Now this comes pre-programmed with the default firmware. You can find all the firmware, SDK and examples from their github repo.
If you want to flash the latest firmware, download the latest firmware from here.
sudo ./kflash.py -p /dev/ttyUSB0 -b 115200 ../maixpy_v0.1.1_beta.bin
After flashing the latest firmware, you can login to the device through a serial terminal program like putty or minicom and start MicroPython-ing :)
Pressing reset button will reboot the board and will bring up a MicroPython prompt.
Now let us try to blink the on-board LEDs. Sipeed MAIX BIT has an RGB LED wired to 3 GPIOs in active-low configuration. i.e The GPIOs act as current sink here and not as a source to drive the LEDs. We have to map those GPIOs, configure them as outputs and drive them in a loop.
Now let us write a loop to cycle through all 8 combinations of these 3 LEDS. I am adding a counter variable and masking just the last three bits of the counter to feed as logic values for the LEDs.
You can see the RGB LEDs in action below !
If you want to flash the latest firmware, download the latest firmware from here.
sudo ./kflash.py -p /dev/ttyUSB0 -b 115200 ../maixpy_v0.1.1_beta.bin
After flashing the latest firmware, you can login to the device through a serial terminal program like putty or minicom and start MicroPython-ing :)
Pressing reset button will reboot the board and will bring up a MicroPython prompt.
Now let us try to blink the on-board LEDs. Sipeed MAIX BIT has an RGB LED wired to 3 GPIOs in active-low configuration. i.e The GPIOs act as current sink here and not as a source to drive the LEDs. We have to map those GPIOs, configure them as outputs and drive them in a loop.
Now let us write a loop to cycle through all 8 combinations of these 3 LEDS. I am adding a counter variable and masking just the last three bits of the counter to feed as logic values for the LEDs.
You can see the RGB LEDs in action below !
Comments
Post a Comment