PiSupply / PaPiRus

Resources for PaPiRus ePaper eInk displays
https://www.pi-supply.com/product/papirus-epaper-eink-screen-hat-for-raspberry-pi/
Other
345 stars 88 forks source link

Perhaps refactor papirus-temp with device tree driver for LM75 #85

Open shawaj opened 7 years ago

shawaj commented 7 years ago

Perhaps we could look at using the newly created LM75 temp sensor device tree driver and update the papirus-temp script accordingly?

In future, this could be incorporated as a device tree blob onto the EEPROM on the PaPiRus HAT

shawaj commented 7 years ago

Take a look here - https://www.raspberrypi.org/forums/viewtopic.php?p=1130515#p1130515

And here:

https://github.com/raspberrypi/linux/search?utf8=✓&q=Lm75

shawaj commented 7 years ago

Also see #41

Would be good to change this to a python script rather than a bash script (could keep the bash script as a legacy script somewhere, as seems pointless to just flat out delete it but worth having more continuity in programming language used)

francesco-vannini commented 7 years ago

@tvoverbeek is this taken care of in #117 ?

tvoverbeek commented 7 years ago

No. The I2C interface for the LM75 (as long as you are only interested in the temperature) is very simple. Does not warrant to use the device-tree for this simple interface. Converting it to a python script is something worth doing.

shawaj commented 7 years ago

The device tree driver is already there I believe? Just need to add a line to the config.txt I think to enable it

tvoverbeek commented 7 years ago

Yes, but when enabled you cannot access it directly via I2C in python using smbus.. Would have to rewrite the LM75B access in lm75.py (imported by epd.py) to make use of the kernel driver interface. Moreover installation then requires checking of config.txt for the correct dtoverlay.

shawaj commented 7 years ago

@tvoverbeek cool - lets park this one for now then. Seems like a bad idea!