Raspberry Pi HAT for autonomous RC cars
Note: I have a small quantity built, programmed, and tested available for sale. Contact [email protected]
Features:
The power section is reverse-protected (putting the wires in backwards = no current flows) and has a transient voltage suppression diode, so it should be safe from parallel-connected motors trying to blow it up.
This board is designed to mate with this display: https://www.ebay.com/itm/2-2-inch-TFT-LCD-Display-SPI-ILI9341-240x320-for-51-AVR-STM32-ARM-PIC-Arduino/191816725599 (also available through several resellers on AliExpress and others) -- make sure to get the one with four pins on the far side (some have 5). Those four pins are only used for mounting, though, so not critical.
Use the fbtft device driver in Raspbian for the display. Create /etc/modprobe.d/fbtft.conf
with the following contents:
options fbtft_device name=adafruit22a rotate=90
Create /etc/modules-load.d/fbtft.conf
with:
spi-bcm2835
fbtft_device
Follow the instructions at https://github.com/notro/fbtft/wiki/Boot-console to enable the boot console and set the console font, then reboot and your display should show the boot console (albeit very small!). At this point, /dev/fb0
is a memory-mappable device which the code at https://github.com/a1k0n/cycloid uses to display the camera view and the menu.
From a fresh Raspbian image, use apt-get install i2c-tools
and i2cdetect 1
should show two addresses in use: 0x69 (the IMU) and 0x75 (the microcontroller).
Instructions for interfacing with the on-board microcontroller (via I2C, serial, or reflashing the firmware) are at: https://github.com/a1k0n/cycloid/tree/master/stm32
Comments (0)