This guide provides step-by-step instructions for installing an OLED display on the Wizbot robot. We will be using a Raspberry Pi with the OLED display, leveraging the I2C communication protocol.
- Raspberry Pi (with Ubuntu 18.04 or a similar OS)
- OLED display (compatible with the SSD1306 driver)
- Internet connection on Raspberry Pi
- Basic familiarity with terminal commands
The I2C interface on the Raspberry Pi needs to be enabled to communicate with the OLED display. Follow these steps:
-
Install I2C tools and SMBus:
sudo apt install i2c-tools python-smbus
-
Enable I2C Interface: Open the Raspberry Pi configuration file:
sudo nano /boot/firmware/usercfg.txt
Add the following line to enable the I2C interface:
dtparam=i2c_arm=on
Save and exit the file (CTRL+X, then Y, then Enter).
-
Install GPIO Library:
sudo apt install rpi.gpio
-
Check if I2C is Available: Use the following command to verify if I2C devices are detected:
sudo i2cdetect -y 1
Note down the address of the detected devices.
We'll use the Adafruit SSD1306 Python library for the OLED display.
-
Clone the Adafruit SSD1306 Repository:
git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
-
Navigate to the Repository Directory:
cd Adafruit_Python_SSD1306
-
Install the Library:
sudo python3 setup.py install
Run the provided example script to test if the OLED display is working correctly.
-
Navigate to the Examples Directory:
cd examples
-
Run the Test Script:
python3 stats.py
This script should display system statistics on the OLED screen. If the display is working correctly, you should see text and graphics on the screen.
If you encounter any issues, please ensure all connections are secure and the I2C address matches the address in your script. For further assistance, raise an issue in this repository.
Contributions to this guide are welcome. Please fork the repository and submit a pull request with your improvements.
[Add your chosen license here]