Jump to content

jiko

Validating
  • Posts

    3
  • Joined

  • Last visited

Reputation Activity

  1. Like
    jiko reacted to martinayotte in Nanopi m4v2, SD reader dead, forgotten eMMC password - can I reset?   
    On all Rockchip SoCs, eMMC has boot priority over SDCard.
    If you wish to boot from SDCard, you need to stop U-Boot from eMMC by pressing <spacebar> multiple during early boot process, then you get into U-Boot command prompt.
    You can then tell U-Boot you wish to boot from SDCard by giving the "setenv devnum 1" command followed by "run mmc_boot" ...
  2. Like
    jiko reacted to mar0ni in PWM Fan on Nanopi M4 ??   
    Slightly improved and simplified script (still room for improvement, I guess).
     
    #!/bin/bash if [ ! -d /sys/class/pwm/pwmchip1/pwm0 ]; then echo 0 > /sys/class/pwm/pwmchip1/export fi sleep 1 while [ ! -d /sys/class/pwm/pwmchip1/pwm0 ]; do sleep 1 done ISENABLE=`cat /sys/class/pwm/pwmchip1/pwm0/enable` if [ $ISENABLE -eq 1 ]; then echo 0 > /sys/class/pwm/pwmchip1/pwm0/enable fi echo 50000 > /sys/class/pwm/pwmchip1/pwm0/period echo 1 > /sys/class/pwm/pwmchip1/pwm0/enable # max speed run 5s echo 0 > /sys/class/pwm/pwmchip1/pwm0/duty_cycle sleep 5 echo 49994 > /sys/class/pwm/pwmchip1/pwm0/duty_cycle declare -a CpuTemps=(75000 63000 58000 52000 48000 0) declare -a PwmDutyCycles=(25000 37000 48300 49250 49300 49994) while true do temp=$(cat /sys/class/thermal/thermal_zone0/temp) for i in 0 1 2 3 4 5; do if [ $temp -gt ${CpuTemps[$i]} ]; then DUTY=${PwmDutyCycles[$i]} echo $DUTY > "/sys/class/pwm/pwmchip1/pwm0/duty_cycle"; #echo "temp: $temp, target: ${CpuTemps[$i]}, duty: $DUTY" break fi done sleep 2s; done  
  3. Like
    jiko reacted to Sir Lazarus in NanoPI M4   
    It seems, that there is no driver for fan in armbian. So I wrote a little program in C to control fan on the hat. This nice program adjust the fan speed on cpu temperature accordingly. It starts the fan as 60 °C with 30% power. At 70 °C up to 60% and at 80 °C to 90%. You can adjust it within the code easily.
    Compile it with "gcc fancontrol.c -o fancontrol". I configured the program as service. If you want it too, do the following steps:
    Create a file fancontrol.service with the following content:
    [Unit] Description=Fan control [Service] Type=simple User=root Group=root WorkingDirectory=/usr/bin ExecStart=/usr/bin/fancontrol [Install] WantedBy=multi-user.target do the following steps
    sudo cp fancontrol /usr/bin sudo cp fancontrol.service /etc/systemd/system sudo systemctl enable fancontrol sudo systemctl start fancontrol  and that's it.
    It works perfekt for me.
    Have fun.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines