Hello!
I hope I am at the correct place here.
I am using piCorePlayer on a Pi 4 that is inside an Argon one case:
https://www.argon40.com/LEARN/post/assembly-line-how-to-s/argon-one-case-overview/.
There is a script available that installs a system daemon for handling the fan speed:
https://download.argon40.com/argon1.sh. But this is for Raspbian.
The interesting part of the script for the fan is this:
echo 'def temp_check():' >> $powerbuttonscript
echo ' fanconfig = ["65=100", "60=55", "55=10"]' >> $powerbuttonscript
echo ' tmpconfig = load_config("'$daemonconfigfile'")' >> $powerbuttonscript
echo ' if len(tmpconfig) > 0:' >> $powerbuttonscript
echo ' fanconfig = tmpconfig' >> $powerbuttonscript
echo ' address=0x1a' >> $powerbuttonscript
echo ' prevblock=0' >> $powerbuttonscript
echo ' while True:' >> $powerbuttonscript
echo ' temp = os.popen("vcgencmd measure_temp").readline()' >> $powerbuttonscript
echo ' temp = temp.replace("temp=","")' >> $powerbuttonscript
echo ' val = float(temp.replace("'"'"'C",""))' >> $powerbuttonscript
echo ' block = get_fanspeed(val, fanconfig)' >> $powerbuttonscript
echo ' if block < prevblock:' >> $powerbuttonscript
echo ' time.sleep(30)' >> $powerbuttonscript
echo ' prevblock = block' >> $powerbuttonscript
echo ' try:' >> $powerbuttonscript
echo ' bus.write_byte(address,block)' >> $powerbuttonscript
echo ' except IOError:' >> $powerbuttonscript
echo ' temp=""' >> $powerbuttonscript
echo ' time.sleep(30)' >> $powerbuttonscript
They are reading the temperature with "vcgencmd measure_temp" and if it reaches the next step from the config they call this:
bus.write_byte(address,block)
where address is 0x1a and block is the fanspeed from config.
I don't know what this bus.write_byte is doing as I don't have any knowledge here.
Can someone here tell me if it is possible to set the fan running at a defined speed with piCorePlayer (Tiny Core)?
If I switch on the case now and starting piCorePlayer the fan isn't running at all even if the Pi is getting hotter.
Thanky you for help!