-
Notifications
You must be signed in to change notification settings - Fork 7
Hardware Setup
Edward edited this page Sep 3, 2019
·
3 revisions
| Device | Device Pin | GPIO Pin | Description |
|---|---|---|---|
| OLED | SDA | SDA | The project is tested with both SSD1306 and SH1106 oled displays |
| SCL | SCL | ||
| Fuel Gauge | SDA | SDA (Pulled Up) | Used for detect remain battery life by using MAX1704 Chipset. This is optional and can be disables in the config.py |
| SCL | SCL (Pulled Up) | ||
| MIDI IN | RX | Needs a 6N138 chip to normalize input voltage. | |
| MIDI Out | TX | Raspiberry pi is 3.3V out. Midi requires 5V out. 7414 double inverter circuit is required | |
| Up Button | GND | GPIO 17 | Software pulled up. Grounded is on. |
| Down Button | GND | GPIO 22 | Software pulled up. Grounded is on. |
| Left Button | GND | GPIO 27 | Software pulled up. Grounded is on. |
| Right Button | GND | GPIO 23 | Software pulled up. Grounded is on. |
| Center Button | GND | GPIO 23 | Software pulled up. Grounded is on. |
| Enter Button (A) | GND | GPIO 5 | Software pulled up. Grounded is on. |
| ReturnButton (B) | GND | GPIO 6 | Software pulled up. Grounded is on. |
This project is tested on both SSD 1306 and SH1106 OLED displays. By default the address is set to 0x3c and can be
modified in GPIO_Init.py
displayConfig = {
"DisplayType": "SH1106", # Or SSD1306
"Rotation": 2, # 0:0, 1:90, 2:180, 3:270
"port": 1, #i2c port
"address": 0x3c
}Fuel gauge i2c address can be modified under config.py file
batteryConfig = {
"enable": True,
"UPS_Method": "MAX1704", # RaspiUPS or ADS1115 or MAX1704
"Address": 0x76
}You can run the following command in the terminal to get the OLED's I2C address.
sudo apt-get install -y python-smbus
sudo apt-get install -y i2c-toolsOnce installation is complete then run to get current connected address
sudo i2cdetect -y 1or you can follow this guide by adafruit: Adafruit 128x64 OLED Bonnet for Raspberry Pi
The address of the MAX1704 can also be detected if connected.