opi5-fan-control's People
opi5-fan-control's Issues
undefined reference to `crypt' undefined reference to `pow'
orangepi@orangepi5:~/opi5-fan-control$ gcc -o fan-control fan-control.c -lwiringPi
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/libwiringPi.so: undefined reference to `crypt'
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/libwiringPi.so: undefined reference to `pow'
collect2: error: ld returned 1 exit status
I cloned the v0.2 version and seemed to install ok
orangepi@orangepi5:~/opi5-fan-control$ gpio readall
+------+-----+----------+--------+---+ OPI5 +---+--------+----------+-----+------+
| GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO |
+------+-----+----------+--------+---+----++----+---+--------+----------+-----+------+
| | | 3.3V | | | 1 || 2 | | | 5V | | |
| 47 | 0 | SDA.5 | IN | 1 | 3 || 4 | | | 5V | | |
| 46 | 1 | SCL.5 | IN | 1 | 5 || 6 | | | GND | | |
| 54 | 2 | PWM15 | IN | 1 | 7 || 8 | 0 | IN | RXD.0 | 3 | 131 |
| | | GND | | | 9 || 10 | 0 | IN | TXD.0 | 4 | 132 |
| 138 | 5 | CAN1_RX | IN | 1 | 11 || 12 | 1 | IN | CAN2_TX | 6 | 29 |
| 139 | 7 | CAN1_TX | IN | 1 | 13 || 14 | | | GND | | |
| 28 | 8 | CAN2_RX | IN | 1 | 15 || 16 | 1 | IN | SDA.1 | 9 | 59 |
| | | 3.3V | | | 17 || 18 | 1 | IN | SCL.1 | 10 | 58 |
| 49 | 11 | SPI4_TXD | IN | 1 | 19 || 20 | | | GND | | |
| 48 | 12 | SPI4_RXD | IN | 1 | 21 || 22 | 1 | IN | GPIO2_D4 | 13 | 92 |
| 50 | 14 | SPI4_CLK | IN | 1 | 23 || 24 | 1 | IN | SPI4_CS1 | 15 | 52 |
| | | GND | | | 25 || 26 | 1 | IN | PWM1 | 16 | 35 |
+------+-----+----------+--------+---+----++----+---+--------+----------+-----+------+
| GPIO | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | GPIO |
+------+-----+----------+--------+---+ OPI5 +---+--------+----------+-----+------+
Any idea on what the errors are as all new to me.
After a Google I tried gcc -o fan-control fan-control.c -lwiringPi -lcrypt -lm
and worked
Add another varaible for below min temp PWM
In current state when temperature is above but close to MIN_TEMP and MIN_PWM is 0 fun is making noise as PWM value there would be too low for it to spin stable. I would suggest to add another macro, lets say PWM_BELOW_TEMP (default to 0) and set PWM to that value when temperature is below MIN_TEMP. This allow to set MIN_PWM to higher values, lets say 30% - which makes fan not to rotate when temperature below MIN_TYEMP but then instantly start with 30% and to avoid making noise and not to start.
unable to run fan-control in crontab
Hi, I have followed the instructions provided to install and run fan-control on an orangepi5. I'm very new in this domain and struggle to get crontab to run the program on startup/reboot.
To troubleshoot I then tried to run the program directly using
./fan-control
in the directory it was installed: /wiringOP/opi5-fan-control
I then get the following error:
orangepi@orangepi5:~/wiringOP/opi5-fan-control$ ./fan-control
wiringPiSetup: Unable to open /dev/mem or /dev/gpiomem: No such file or directory.
Aborting your program because if it can not access the GPIO
hardware then it most certianly won't work
Try running with sudo?
Running the same command with sudo worked after giving the device password.
lastly here is my crontab command if ever I made a mistake on it:
@reboot /wiringOP/opi5-fan-control/fan-control
What I understand so far is that I need to run crontab with the "sudo" permission. But there is no mention of this in your instructions. Have I overlocked a crucial step ? How can I set things up so ./fan-control doesn't need "permissions" ?
Thank you !
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.