On/Off power button with "soft off" functionality

Hello @ricardoosorio ,

On your first item (firmata failing with /dev/ttyUSB0 not found), we’ll continue the discussion in the other thread as we have an idea on what might be the issue there.

With regards to the ON/OFF button, there’s no pin on the balenaFin that has this function. It will need to be implemented. What my colleague Anuj suggested above was to use a few of the co-processor GPIO pins to do so.

I’ll ask internally to see if we have any examples so you don’t need to write custom firmware, but the general idea would be as follows:

  • Use any GPIO pin from the coprocessor IO header (#25 on the balenaFin datasheet under the title “BalenaFin images and mapping”) to connect it to the button.
  • Assuming the compute module is on, then at a button press do the following:
    • On the coprocessor, schedule a power-off (by grounding PC9) and signal the compute module to shutdown
  • If the compute module was already shut-down, then the co-processor would just need to enable PC9 to turn the compute module on.