You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: examples/raspi/README.md
+47-6
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,41 @@
1
-
# raspi demo for oled(ssd1306)
1
+
# SSD1306 demo on Raspberry pi
2
2
3
-
in rust
3
+
This is a sample that uses the built-in I2C bus available in Linux on the Raspberry Pi B/2/3/4.
4
4
5
-
## Quick start
5
+
## Connections
6
+
7
+
This sample relies on the default [Raspberry Pi pinout](https://www.raspberrypi.org/documentation/usage/gpio/) for i2c:
8
+
9
+
| Pin | Description |
10
+
|-----|-------------------------------------|
11
+
| 1 | 3.3 v power |
12
+
| 3 | GPIO 2 (SDA) |
13
+
| 5 | GPIO 3 (SCL) |
14
+
| 6 | ground |
15
+
16
+
17
+
Some boards such as the [Adafruit OLED bonnet](https://www.adafruit.com/product/3531) use this same pinout if you want something ready to use without extra wiring or soldering.
18
+
19
+
## OS Configuration
20
+
21
+
If you're using Raspbian - [raspi-config](https://www.raspberrypi.org/documentation/configuration/raspi-config.md) has an option to enable I2C by default. If you're using another distro - do a quick search and you will probably find a solution to enable it.
22
+
23
+
Before running this sample, you can check that your OLED display is detected by installing `i2c-tools` from your distro, then running `i2cdetect -y 1`. The first connected SSD1306 will usually be at address `0x3c`. This sample assumes `0x3c`. If your device is at a different address, then you may need to modify the code for it to work.
0 commit comments