Replies: 1 comment
-
I'm not sure WHY you're trying to do what you are; Artisan can control outputs, depending on what the output controller is - and in your case, changing a fan based on some temperature limit seems pretty much totally in the wheelhouse of Artisan. I don't know Linux at all well enough to comment, but under Windows trying to run two applications reading from a single serial port would not work (and a Python script would be a second app), they are locked as exclusive access. If your script will work, it will work when Artisan is closed, otherwise you'd need to describe what hardware your current Artisan setup is reading and then you might be able to get suggestions about setting up Python to read the data and whether it's possible to get multiple applications "tee"-ing into that data. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have installed the latest version of Artisan on a Raspberry Pi 4.
My device is a Voltcraft 125-4.
I can get the readings of the temp probes within Artisan, next step would be to get these data into a Python-script in order to trigger an action of GPIO-connected external hardware fe "slow-down fan if BT < 150 C"...
Any ideas how to get access the readings within Python?
Came up with this script sofar but does not give me any data:
#!/usr/bin/env python
import time
import serial
ser = serial.Serial(
port='/dev/ttyAMA0',
baudrate = 115200,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=0.4
)
print "Starting here"
while 1:
x=ser.readline()
print x
print "Ending here"
Thanks and regards,
Beta Was this translation helpful? Give feedback.
All reactions