cd ~/anavi-examples/sensors/HTU21D/c/
make
./HTU21D
Verify that the output is similar to (the exact values depend on the atmospheric condition):
pi@raspberrypi:~/anavi-examples/sensors/HTU21D/c $ ./HTU21D
HTU21D Sensor Module
25.64C
118.99%rh
BH1750 Light Sensor Module
BH1750 Light Sensor Module
Follow the steps below to use the BH1750 I2C light sensor with ANAVI Infrared pHAT:
Connect BH1750 to any of the I2C slots on ANAVI Infrared pHAT using male to female Dupont jumper wires.
Type in the following command and verify that the address of the sensor is listed:
sudo i2cdetect -y 1
Type in the following commands to build and run the sample application that display luminous emittance:
cd ~/anavi-examples/sensors/BH1750/c/
make
./BH1750
Verify that the output is similar to (the exact values depend on the atmospheric condition):
pi@raspberrypi:~/anavi-examples/sensors/BH1750/c $ ./BH1750
BH1750 Sensor Module
Light: 418 Lux
Infrared and LIRC
Infrared and LIRC
ANAVI Infrared pHAT has built-in infrared receiver and transmitter.
(Linux Infrared Remote Control) is popular open source application for sending and receiving
data over infrared on GNU/Linux distributions. This chapter provides guidelines how to enable ANAVI Infrared pHAT infrared receiver and transmitter on Raspbian
Raspbian and
to use LIRC.
In 2019 lirc_rpi, the Linux kernel module provided with Raspbian before, was replaced with gpio-ir and gpio-ir-tx. This tutorial is updated for Raspbian Buster. If you
need to setup ANAVI Infrared pHAT on an older version of Raspbian, for example from 2018-04-18, please
.
Setting up LIRC
Setting up LIRC
Perform the steps below to build LIRC from source, to patch it and to enable the infrared receiver and transmitter on ANAVI Infrared pHAT:
Install dependencies
sudo su -c "grep '^deb ' /etc/apt/sources.list | sed 's/^deb/deb-src/g' > /etc/apt/sources.list.d/deb-src.list"
sudo apt update
sudo apt install -y vim devscripts dh-exec doxygen expect libasound2-dev libftdi1-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libusb-dev man2html-base portaudio19-dev socat xsltproc python3-yaml dh-python libx11-dev python3-dev python3-setuptools
Download LIRC source code
mkdir ~/lirc-src
cd ~/lirc-src
apt source lirc
Apply a patch to fix LIRC for Raspberry Pi
wget https://raw.githubusercontent.com/neuralassembly/raspi/master/lirc-gpio-ir-0.10.patch
patch -p0 -i lirc-gpio-ir-0.10.patch
cd lirc-0.10.1
debuild -uc -us -b