Skip to content

rm-hull/TR4-monitor

Repository files navigation

TR4 Monitor

Small utility script to display TR4 system information on a 2.42" SSD1309 OLED, connected to a USB port via an FT232H adapter.

Block diagram

Bill of materials

Software

Hardware

Installation

  1. Install native dependencies as follows:
sudo apt install libusb-1.0
  1. 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"
  1. Add your user to the plugdev group (log out and back in again to get the command to be effective):
sudo adduser $USER plugdev
  1. 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
  1. Ensure you have pipenv installed, and then initialize the environment:
pipenv install -d
  1. 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

Pin-outs

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

TODO

  • Allow network interface to be specified as cmd-line argument
  • Allow subheader to be specified as cmd-line argument
  • Don't hardcode linux release version
  • Use 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

References

About

Small utility script to display TR4 system information on a 2.42" SSD1309 OLED

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages