Greetings.
Here are a list
- Update your image and install with following command:
sudo pacman -Syu && sudo pacman -S cronie i2c-tools lm_sensors git python-pip
- Follow this guide to enable i2c on archlinuxarm
Configure the bootloader to enable the i2c hardware by appending to /boot/config.txt
: dtparam=i2c_arm=on
Configure the i2c-dev
and i2c-bcm2708
(if not blacklisted for the camera) modules to be loaded at boot in /etc/modules-load.d/raspberrypi.conf
: i2c-dev i2c-bcm2708
Reboot the Raspberry Pi and issue the following command to get the hardware address: i2cdetect -y 1
Now instantiate the device. Change the hardware address to the address found in the previous step with ‘0x’ as prefix (e.g. 0x48) and choose a device name:
echo >/sys/class/i2c-adapter/i2c-1/new_device
Check dmesg
for a new entry: i2c-1: new_device: Instantiated device ds1621 at 0x48
Finally, read the sensor output: sensors
-
Install screen relaited packages and download examples:
sudo pip install --upgrade pip setuptools wheel
sudo pip install Adafruit_BBIO Adafruit-SSD1306
git clone https://github.com/adafruit/Adafruit_Python_SSD1306.git
-
Check the display info script and copy it to home directory
python Adafruit_Python_SSD1306/examples/stats.py
cp Adafruit_Python_SSD1306/examples/stats.py ~/
-
Setup script autostart
sudo crontab -e
then paste following
@reboot python /home/pi/stats.py &
then press in series : q
note that: “:” in the line above is not a punctuation, but a part of the commend
Hope that this’ll help.