Open giuliomoro opened 5 years ago
This can be done by looking at register Status Register (STATUS) (Address = 0x0A) .
Bit 2 will be high when there is power on the USB_VIN line, and Bit 3 will be high when there is power on the AC_VIN line. Quick and dirty check:
i2cget -y -f 0 0x24 0xa
You would normally read:
both: 0x8c usb only: 0x84 ac only: 0x88
In the case of Salt, these correspond to:
both: 0x8c (Eurorack power + USB connected to host. All good) usb only: 0x84 (No Eurorack power >>> should fail/warn the user!!!) ac only: 0x88 (No USB power. All good)
Particularly useful for Salt.
https://forum.bela.io/d/872-output-when-patch-when-not-running/34