What I2C driver solution to use? Thermal imaging
#1
Hi All, 

The main question is if you can provide direction on selecting a generic driver that can be later used with applications. 

I am working on a project to add an AMG8833 thermal sensor to the PinePhone, the flex board to expose the pogo pins works, the PCB that holds the AMG8833 is also working fine and it is already being detected. Now on the software side I am not that good so I hope I can get your help on this. 

[Image: IMG-0224.jpg]

Code:
[root@manjaro-arm Raspberry-Pi-Installer-Scripts]# i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                

Address has been set with a pulldown resistor on the sensor so it is 0x68.

I can read from the sensor and get temperature values: 
Code:
[root@manjaro-arm Raspberry-Pi-Installer-Scripts]# i2cget 3 0x68 0x80
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will read from device file /dev/i2c-3, chip address 0x68, data address
0x80, using read byte data.
Continue? [Y/n] Y
0x4a

I have tried with Adafruit circuit python with no success to use its examples as I get stuck in needing to install libgpiod which needs a higher version of linux headers than the ones I have installed and are available in Manjaro Beta 2. 
Code:
configure: error: "libgpiod needs linux headers version >= v5.10.0"
Code:
[root@manjaro-arm Raspberry-Pi-Installer-Scripts]# uname -r
5.9.1-9-MANJARO-ARM
[root@manjaro-arm Raspberry-Pi-Installer-Scripts]# pacman -S linux-pinephone-headers
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-pinephone-headers-5.9.9-1

Total Installed Size:  44.91 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n]
Maybe I need to try a different PinePhone distribution? Any recommendations?  

I would like to hear from other users experiences and what they use for I2C drivers.  Do you use a generic driver or write your own from scratch? 

The end purpose is to create a portable infrared camera on your pocket.  

Cheers!.
  Reply
#2
Try Arch, it is closer to the amputee ward than Manjaro. I think Manjaro started cause a bunch of sysadmins got upset the Arch's updates would break their systems. Smile
On aarch64 if it is not in Arch you may be able to find Debian/Mobian libraries or apps you can debtap or port.

HTH
LF
  Reply
#3
Thanks for your reply, I will try another OS but also I am experimenting with docker containers and by passing the /dev/i2c-3 when running the container so not to mess with the host OS.
  Reply
#4
This might be a start - no progress recently:
https://github.com/vuorioi/amg88xx-kernel-driver

This app uses wiringPi for its i2c access - no idea how portable that is:
https://github.com/ayaromenok/RaspberryP...ForAMG8833
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple privacy office solution for the Pinepone Peter Gamma 0 277 06-13-2024, 05:45 PM
Last Post: Peter Gamma
  Article: NuttX RTOS for PinePhone: Display Driver in Zig lupyuen 0 1,366 10-17-2022, 07:02 PM
Last Post: lupyuen
  Article: NuttX RTOS for PinePhone: UART Driver lupyuen 0 1,062 09-09-2022, 10:35 PM
Last Post: lupyuen
  PSA: WiFi driver is broken - Unload kernel module to save lots of power Trbl 3 4,634 06-23-2021, 02:28 AM
Last Post: Merc
  Pinephone as daily driver lcayer1 15 21,938 10-13-2020, 07:18 PM
Last Post: hiimtye

Forum Jump:


Users browsing this thread: 1 Guest(s)