CHIP computer: I2C bus - AD7415 temperature sensor
- August 30 2016
- Raspberry Pi, Cubieboard, Banana Pi, BeagleBone, Orange Pi
- 2696 Reads
- 0 Comments
In this article, I show you how to do it.
Articles about CHIP computer:
CHIP computer: first sight and comparison with Raspberry Pi Zero - pizero
CHIP computer: connection to WiFi, SSH, UART
CHIP computer: speed of USB, WiFi, current consumption and pictures from thermal image
CHIP computer: flashing OS, python, LED and blinking of LED after boot
CHIP computer: USB webcam
CHIP computer: I2C bus - AD7415 temperature sensor
You can use these steps for another SBC like Raspberry Pi, Banana Pi, Cubieboard, NanoPi and more.
At first, install i2c-tools
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install i2c-tools
Connect device (I have temperature sensor AD7415 with 0x4A address)
If you don't know the address of I2C device, use this command. It finds all address which is connected to CHIP computer.
sudo i2cdetect -y -r 2
2 - number of I2C bus.
Temperature:
sudo i2cget -y 2 0x4a
I made easy bash script which sends data to http://tmep.cz
Download of bash script here. If you use tmep.cz, fill your domain to bash script.
You can make crontab with this bash script.
sudo crontab -e
Add:
*/5 * * * * /PathToScript
Script will be execute every 5 minutes.