Giter Club home page Giter Club logo

raspi-fanshim's Introduction

Raspberry Pi Fan SHIM library

Provides functions to control the pimoroni Fan SHIM device on a Raspberry Pi.

Features

Fan control

Basic functions to enable/disable the fan or query its state.

/**
 * @brief   Queries the current status of the fan.
 * 
 * @return  `True`, if the fan is currently running or `false`, if not.
 */
bool RaspiFanshimIsFanEnabled(void);

/**
 * @brief   Enables or disables the fan.
 * 
 * @param   enabled Pass `true` to enable the fan, `false` to disable it.
 */
void RaspiFanshimEnableFan(bool enabled);

/**
 * @brief   Toggles the fan.
 */
void RaspiFanshimToggleFan(void);

LED control

Allows setting the color and brightness value of the integrated APA102 LED.

/**
 * @brief   Updates the color of the `Fan SHIM`s integrated `APA102` LED.
 * 
 * @param   r           The red color component.
 * @param   g           The green color component.
 * @param   b           The blue color component.
 * @param   brightness  The LED brightness (0..31).
 */
void RaspiFanshimUpdateLED(uint8_t r, uint8_t g, uint8_t b, uint8_t brightness);

Build

Install the required wiringPi library.

sudo apt install wiringpi

You can use CMake to generate project files for your favorite C99 compiler.

git clone --recursive 'https://github.com/flobernd/raspi-fanshim.git'
cd raspi-fanshim
mkdir build && cd build
cmake ..
make

Service

The RaspiFanshim projects contains an example service that can be used as a replacement for the original python based Fan SHIM system service. It uses less CPU resources and provides more configuration options (in the source file).

This project is work in progress.

License

RaspiFanshim is licensed under the MIT license.

raspi-fanshim's People

Contributors

flobernd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

raspi-fanshim's Issues

Need more instructions

I've got it compiled however need more instructions on how to get the commands to work. I want to change the color from green to blue to better reflect cool to hot colors.

RPi 3b+ Ubuntu 20.04.1 LTS (arm64) compile error

I was trying to compile raspi-fanshim on my RPi and I can"t get past
sudo cmake ..
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
wiringPi_LIB
linked by target "RaspiFanshim" in directory /home/ubuntu/raspi-fanshim
linked by target "RaspiAPA102" in directory /home/ubuntu/raspi-fanshim/dependencies/raspi-apa102

-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/raspi-fanshim/build/CMakeFiles/CMakeOutput.log".

wiringpi is installed ...

Any ideas how to solve this? Thanks.

WiringPi?

Please link WiringPi for people who don't use Debian-based GNU/Linux OS distributions.

Fanshim on Openwrt

Hi all, I used fanshim on my raspberry pi 4 for months.
Now, I m going to use my raspberry as a router with Openwrt on it.
There is a way to install fanshim on Openwrt since it doesn't use apt as package manager?
Thanks

Fanshim and Raspbee

Hi Florian

Greetings from Switzerland.

I am a bit new to all this so excuse me for any mistakes.

I am running a Raspi 4 with full buster and a Raspbee Module from Dresden Electronics.

Everything worked well till now.

Yesterday I bought a Fanshim and installed it and now started the problems.

As soon as I start the default Fanshim service the dconz software cannot connect to the raspberry so, for now, i have had to remove the fanshim.

Could you guide me to the problem?

Also, i wanted to install your fanshim service, but am confused on how to compile and install it as have never worked on c before.

Could you guide me as a newbie on how to install it as a newbie and so that it does not conflict with raspbee?

I await your update.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.