Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: carsten_h on January 23, 2020, 05:18:11 AM
-
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/ (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 (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!
-
I hope I am at the correct place here.
Afraid not. :P The TinyCore Team has requested this forum not to be used for piCorePlayer support.
-
Oh, sorry! I don't know that!
Thank you for the information!