geeekpi / dockerpi

This is a repository for docker pi kit's modules, such as nightlight hat board and 4 channel relay hat board for Raspberry Pi
11 stars 5 forks source link

powerboard_daemon source? Documentation? #3

Closed slackinfux closed 7 months ago

slackinfux commented 4 years ago

Hi,

Is there any example source code for the powerboard_daemon or documentation on how the Powerboard actually works? I would like to use the powerboard on a different OS than Raspbian.

How is this working on Orange Pi and Banana Pi? I'd really just rather use a python script to initiate the shutdown since the daemon seems to stop responding to inputs from the button or the remote after I quit running Kodi, unless I stop and restart it using systemctl.

shauwki commented 2 years ago

I was wondering the same. I'd like to see the source of this project and customise it to my needs. Thanks in advance.

corvus-ch commented 2 years ago

I am also on the search for the source. Reason being, I have the same issue as #2 and I would like to understand what is going on.

yoyojacky commented 7 months ago

It communicates with MCU on board via I2C protocol, the power board will registered at 0x10, you can check the register 0x32 if it has been set to 0x01, and then trigger the system call to shut down the OS, you can refer to the source code in the powerboard folder, called : powerboard_daemon.c, since wiringPi library has been depracated, so we need to use another way to communicate with MCU via I2C protocol, so it may a little bit difiicault for other people, we will create 64bit and 32bit binary file and upload to this repository and then build a new makefile after fully testing on Raspberry Pi OS (The Latest one ) and test it out on Raspberry Pi 5 too.