Hello, I am currently using nanobsd on a Nanopi Neo and I am looking for a way to shutdown (and save configuration) via a external button.
My first idea was to use an AVR/PIC that sends a heartbeat via a GPIO pin. When a key is pressed, the heartbeat stops, the OS save the configuration and shutdown. The AVR could switch off the PSU after a delay.
The problem is how to be sure the OS is really stopped before switch-off. I saw a solution with an AVR/PIC that wait for some message on UART. In my case, I need the UART for other uses. But maybe you have a better, simpler idea?
My first idea was to use an AVR/PIC that sends a heartbeat via a GPIO pin. When a key is pressed, the heartbeat stops, the OS save the configuration and shutdown. The AVR could switch off the PSU after a delay.
The problem is how to be sure the OS is really stopped before switch-off. I saw a solution with an AVR/PIC that wait for some message on UART. In my case, I need the UART for other uses. But maybe you have a better, simpler idea?