after several weeks of using, i can say lms on pi4 (picoreplayer 6.0.0) works perfectly.
Results 581 to 590 of 1355
-
2019-11-28, 06:33 #581
- Join Date
- May 2009
- Posts
- 724
Touchx2,radiox4, Squeezebox Server 7.9 (Raspberrypi 3 and qnap ts-269)
-
2019-11-28, 07:59 #582
- Join Date
- May 2017
- Posts
- 58
Getting there. I've discovered the modprobe commands to install the framebuffer:
Code:modprobe flexfb setaddrwin=0 width=240 height=240 init=-1,0x11,-2,120,-1,0x36,0x00,-1,0x3A,0x05,-1,0xB2,0x0C,0x0C,0x00,0x33,0x33,-1,0xB7,0x35,-1,0xBB,0x1A,-1,0xC0,0x2C,-1,0xC2,0x01,-1,0xC3,0x0B,-1,0xC4,0x20,-1,0xC6,0x0F,-1,0xD0,0xA4,0xA1,-1,0x21,-1,0xE0,0x00,0x19,0x1E,0x0A,0x09,0x15,0x3D,0x44,0x51,0x12,0x03,0x00,0x3F,0x3F,-1,0xE1,0x00,0x18,0x1E,0x0A,0x09,0x25,0x3F,0x43,0x52,0x33,0x03,0x00,0x3F,0x3F,-1,0x29,-3 modprobe fbtft_device name=flexfb speed=32000000 cs=1 gpios=dc:9
Code:fbcon=map:10 fbcon=font:PEARL8x8
I've also created a /mnt/mmblk0p2/tce/jivelite.sh file to start Jivelite on /dev/fb1, but it currently exits immediately after starting.
-
2019-11-28, 21:32 #583
I finally got my Pi4 and using it for a PLEX server.
I'm running pCP on a Pi3, and may move it to another Pi4 next.
I know that the 4 runs hot, and expect that a fan will be needed with pCP/Pi4 (please correct me if I'm wrong), but I would like to use a fan control that will turn on the fan only when hot (thereby turning off when pCP is idle).
Here's the source I used for the fan control on my Pi4 PLEX Media Server: https://howchoo.com/g/ote2mjkzzta/co...erature-python
Question: Will I be able to add a script to /etc/init.d/ and /usr/local/bin or will this be overwritten with Insitu_update's?Tony
SBTouch ♪ SBRadio ♬
-
2019-11-29, 00:52 #584
Whether you need a fan or not will probably depend on what sort of case you have. If it provides good airflow, or incorporates some sort or heatsink, then running pCP/LMS isn't, in my experience, going to overheat the CPU.
I have my PI4 inside an amplifier enclosure, where the ambient temperature can get quite high but the airflow is reasonable. I have a fan set to come on at 68 degrees, and I find that the fan is not coming on at all now that it's winter. At the height of summer, and perhaps with the sun falling on the amp through the window, the fan would occasionally come on.
I control my fan with my own script (fan.sh), which I launch as a User Command from the pCP 'Tweaks' section (/home/tc/fan.sh -g 4 -t 68 -s 5 -l). In case anyone else might find it useful, my script is as follows:
Code:# Ctrl-C handler for clean shutdown shutdown() { # turn fan off echo "0" > /sys/class/gpio/gpio$pin/value echo -e "\nStopping Fan" exit 0 } usage() { echo " usage: $0 [-g] [-t] [-s] [-l] [-v]" echo " -g GPIO output pin to control fan (BCM)" echo " -t Temperature to turn fan on" echo " -s Update rate in seconds" echo " -l Log data to file (e.g. /home/tc/fanlogs/fan_$(date +%d-%m-%Y)).log" echo " -v Verbose" echo "" echo " The turn-on temperature is stored in /home/tc/ontemp.dat" echo " To set a new temperature while the script is running," echo " edit that file, or run /home/tc/SetFanTemp.sh <new temp>" echo "" exit 1 } # Trap Ctrl-C, call 'shutdown' trap shutdown SIGINT # defaults pin=4 ontemp=58 nsecs=2 log=0 verbose=0 # handle command line parameters if [ "$1" == "" ] || [ "$1" == "--help" ]; then # no command line parameters, or --help usage exit fi while getopts "g:t:s:lvh" opt; do case ${opt} in g ) # fan control pin (GPIO BCM) pin=$OPTARG ;; t ) # CPU temp to turn fan on ontemp=$OPTARG ;; s ) # Update rate in seconds nsecs=$OPTARG ;; l ) # Log data to file log=1 ;; v ) # verbose = report every 2 seconds verbose=1 ;; h ) usage ;; esac done # save ontemp to file, so that value can be changed externally echo $ontemp > /home/tc/ontemp.dat if [ $verbose == 1 ]; then echo "ontemp = $ontemp (stored in /home/tc/ontemp.dat)" echo "pin = $pin" echo "update rate = $nsecs" fi # initialise duty cycle variables intvls=0 intvls_on=0 # Export pin to userspace if [ ! -e /sys/class/gpio/gpio$pin ]; then echo "$pin" > /sys/class/gpio/export fi # set control pin to output mode echo "out" > /sys/class/gpio/gpio$pin/direction # set pin to "0" to turn fan off initially echo "0" > /sys/class/gpio/gpio$pin/value fanstate="OFF" # check temperature once every nsecs and set fan accordingly while true; do # read ontemp from file ontemp=$(cat /home/tc/ontemp.dat) # CPU temp to turn fan off - set to one degree lower to reduce on/off frequency offtemp=$(( $ontemp-1 )) # read current CPU temperature cpu_temp=$(cat /sys/devices/virtual/thermal/thermal_zone0/temp) cpu_temp=$(( ($cpu_temp+500)/1000 )) # get nearest integer if [ "$cpu_temp" -ge $ontemp ]; then # turn fan on echo "1" > /sys/class/gpio/gpio$pin/value fanstate="ON " fi if [ "$cpu_temp" -lt $offtemp ]; then # turn fan off echo "0" > /sys/class/gpio/gpio$pin/value fanstate="OFF" fi # calculate duty intvls=$((intvls+1)) if [ $fanstate == "ON" ]; then intvls_on=$((intvls_on+1)) fi duty=$((100*intvls_on/intvls)) timestamp=$(date +"%T") # datestamp=$(date +"%d/%m/%y") # verbose output to terminal if [ $verbose == 1 ]; then echo "$timestamp CPU Temperature = "$cpu_temp"/$ontemp; Fan = $fanstate; Duty = $duty% of $((intvls*$nsecs)) seconds" fi # concise output to logfile if [ $log == 1 ]; then # logfile name reconstructed for every output, so that a new file is created every day logfile="/home/tc/fanlogs/fan_"$(date +%d-%m-%Y)".log" echo "$timestamp $cpu_temp/$ontemp $fanstate" >> "$logfile" fi sleep $nsecs done
-
2019-11-29, 07:09 #585
Thanks. I forgot about the pCP 'Tweaks' section.
Also, thanks for the code. Like that you're using gpio4 for a switch (No need for a transistor to switch in the write-up I found).Tony
SBTouch ♪ SBRadio ♬
-
2019-11-29, 11:15 #586
Pure coincidence - I didn't know that! Do you have a link for that? My fan is switched by a transistor in the GND wire (earlier post).
-
2019-11-29, 11:35 #587
I think I found the link you're referring to - is it this one?
I think their wording ('GPIO pin 4 (5V)') is misleading - I think they're connecting to physical pin 4, which is a 5V supply pin, rather than GPIO4 (physical pin 7). I think the fan current is too much for GPIO4 (or any GPIO pin), so if you want to use a GPIO pin to control the fan you're going to need a transistor.
-
2019-11-29, 16:03 #588
-
2019-11-29, 16:06 #589
That post is just for adding a fan to the 'Official' Pi Case (I used this case: https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1 ).
The post I linked (https://howchoo.com/g/ote2mjkzzta/co...erature-python) added to that by having a (py script) control to turn the fan On/Off based on the temp (and used a transistor). I used that guide to add fan control to my Pi4.
Here's his circuit:Last edited by Tony T; 2019-11-29 at 16:13.
Tony
SBTouch ♪ SBRadio ♬
-
2019-11-30, 02:39 #590
- Join Date
- Oct 2019
- Posts
- 11