WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Using piCorePlayer on a Pi 4 inside an Argon one case  (Read 1768 times)

Offline carsten_h

  • Newbie
  • *
  • Posts: 2
Using piCorePlayer on a Pi 4 inside an Argon one case
« 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/.
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:
Code: [Select]
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:
Code: [Select]
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!

Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 404
Re: Using piCorePlayer on a Pi 4 inside an Argon one case
« Reply #1 on: January 23, 2020, 04:59:12 PM »
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.

Offline carsten_h

  • Newbie
  • *
  • Posts: 2
Re: Using piCorePlayer on a Pi 4 inside an Argon one case
« Reply #2 on: January 23, 2020, 10:24:33 PM »
Oh, sorry! I don't know that!
Thank you for the information!