Eugene uses the Raspberry Pi to detect ambient and object temperature. Thsi is a non-contact thermometer using GY-906 sensor on a MLX90614 board, and is useful for temperature monitoring and many other practical tasks. This was created in Xojo 2023 r4.
Ensure I2C is enabled on the Raspberry Pi.
The teaser video can be viewed at:
To use the lgpio with Raspberry Pi 4 or older systems, get the successful chip handle (not a zero) with the following command:
Initialize the Raspberry Pi 4 lgpio |
---|
MyChipHandle = lgGpiochipOpen(0) //dev/gpiochip0 for Raspberry Pi 4 or older |
To use the lgpio with the Raspberry Pi 5 board, get the chip handle with the following command:
Initialize the Raspberry Pi 5 lgpio |
---|
MyChipHandle = lgGpiochipOpen(4) //dev/gpiochip4 for Raspberry Pi 5 |
Install instructions are:
- install Raspberry Pi OS (64-bit)
- Open a terminal and type the following commands:
- sudo apt install swig python3-dev
- sudo apt install python3-setuptools
- sudo apt install libunwind8
- wget https://github.com/joan2937/lg/archive/master.zip
- unzip master.zip
- cd lg-master
- make
- sudo make install
- Turn on the I2C communication protocol on the Raspberry Pi
- create a MLX90614 example program and copy the program and libraries to the RaspberryPi Desktop (make a 64-bit version)
- give the executable permission to run with something like: 'sudo chmod +x MLX90614'
- run the program with something like: 'sudo ./MLX90614'
Breadboard Layout
Screen Grab of running program