Small utility script to display TR4 system information on a 2.42" SSD1309 OLED, connected to a USB port via an FT232H adapter.
- Python 3
- Luma.OLED
- PySensors3
- PyFTDI
- 2.42" OLED display
- USB FT232H Adapter
- Dark smoked grey acrylic sheet
- 9 Pin Header To Dual USB 2.0 Type A Female
- 10K Thermistor
- Install native dependencies as follows:
sudo apt install libusb-1.0
- Create a udev configuration file to allow user-space processes to access the FTDI device. Typically, create a file, /etc/udev/rules.d/11-ftdi.rules:
# /etc/udev/rules.d/11-ftdi.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", GROUP="plugdev", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6011", GROUP="plugdev", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", GROUP="plugdev", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6014", GROUP="plugdev", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6015", GROUP="plugdev", MODE="0666"
- Add your user to the plugdev group (log out and back in again to get the command to be effective):
sudo adduser $USER plugdev
- Load the
it87
kernel module, and update /etc/modules to auto-load the module on startup:
sudo modprobe it87
echo "it87" | grep sudo tee -a /etc/modules
- Ensure you have pipenv installed, and then initialize the environment:
pipenv install -d
- Run the monitor using the pygame display emulator (use
-h
to see all flags):
pipenv run python tr4_monitor/main.py -f conf/pygame.conf
OLED Pin | OLED Name | FT232 Pin | FT232 Function | Remarks |
---|---|---|---|---|
1 | GND | GND | GND | Ground |
2 | VCC | +3.3V | 3V3 | +3.3V Power |
3 | SCL | AD0 | SCLK | Serial Clock |
4 | SDA | AD1 | MOSI | Serial Data |
5 | RES | AD6 | GPIO 6 | Reset |
6 | DC | AD5 | GPIO 5 | Data/Command |
7 | CS | AD3 | CE0 | Chip Select |
Allow network interface to be specified as cmd-line argumentAllow subheader to be specified as cmd-line argumentDon't hardcode linux release versionUse framerate regulator- Add sensors data
Allow flags to be passed in via config file- Add photos & gifanimation
- Create docs/index.html & link to home page