Open main menu

Changes

How to connect

1,568 bytes added, 10:34, 23 December 2015
no edit summary
compeletely compatible with Arduino and Raspberry Pi

'''Module Pin Connections'''
{| class="wikitable" border="1"
|-
|-
| Sensor module => Arduino
| Sensor module => Raspberry Pi
|-
| SCL --> A5
| SCL --> SCL
|-
| SDA --> A4
| SDA --> SDA
|-
| GNO --> GNO
| GNO --> GNO
|-
| IRQ --> D2
| IRQ -->GPIO
|-
| VCC --> 5V
| VCC --> 3.3V
|}
* Enable I2C interface of Raspberry PI, can be configured via the raspi-config configuration tool or edit the file '''/boot/config.txt''', add line:
''dtparam=i2c_arm=on''
* Add I2C modules,edit '''/etc/modules file''' (command: sudo nano /etc/modules) , append the following lines:
''i2c-bcm2708''
''i2c-dev''
* Installing the I2C library and tools
''sudo apt-get install i2c-tools python-smbus''
* Update software and install the RPI.GPIO library
''sudo apt-get update''
''sudo apt-get install build-essential python-dev python-pip''
''sudo pip install RPi.GPIO''
* Install graphic library
''sudo apt-get install python-imaging python-smbus''
* Download some software libraries, then run
''sudo apt-get install git''
''git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git''
''cd Adafruit_Python_SSD1306''
''sudo python setup.py install''
* Provide three samples (animate.py, image.py,shapes.py)
'''cd Adafruit_Python_SSD1306'''
'''sudo python shapes.py'''

Note: when using the sensor base plate, OLED on the left and right side interfaces using the RST PIN isdifferent, around 25# and 24# respectively, modify the corresponding pin on the line, the default is the right