generic sysfs GPIO temperature sensor
Posted: Tuesday 31 August 2021 17:54
Hello i was trying to add thermocouple sensor by using ADC MCP3008 directly to GPIO of my RPi. I used this code
echo 4 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio4/direction
and added my GPIO to domoticz hardware. The problem is that i need temperature sensor but when i added my GPIO it shows as lighting input which is now closed. Can someone please tell me is there a way to change it somehow to temperature sensor? input value is now in mV and I have a code to transform it into temp value. How can i implement this transformation that domoticz can read it for 6 GPIOs from my MCP3008 eg.
for i in range 6:
values=((values/1023)*3300*24.39))
Can i put it somehow in domoticz files? i would be very grateful for your help
I assume that connecting ADC channels directly with generic sysfs GPIO domoticz will always give me mV value. maybe you have idea or program where domoticz could read all 6 values from program
echo 4 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio4/direction
and added my GPIO to domoticz hardware. The problem is that i need temperature sensor but when i added my GPIO it shows as lighting input which is now closed. Can someone please tell me is there a way to change it somehow to temperature sensor? input value is now in mV and I have a code to transform it into temp value. How can i implement this transformation that domoticz can read it for 6 GPIOs from my MCP3008 eg.
for i in range 6:
values=((values/1023)*3300*24.39))
Can i put it somehow in domoticz files? i would be very grateful for your help
I assume that connecting ADC channels directly with generic sysfs GPIO domoticz will always give me mV value. maybe you have idea or program where domoticz could read all 6 values from program