NebraLtd / hm-pyhelper

A helper module used across various Nebra repos to reduce redundant features.
https://nebra.io/hmpyhelper
MIT License
9 stars 16 forks source link

Check pisces buttons and LEDs - may need to add additional #133

Open shawaj opened 2 years ago

shawaj commented 2 years ago

@radicale who created a lot of the functionality for the pisces and did the initial hardware exploration mentioned that there is more than one button and more than one LED on the pisces p100 (but these are internal - not on the outside of the case). We should investigate their usage further and see whether we can add support.

Relates to #131 and #130

shawaj commented 2 years ago

@radicale any chance you could test with your pisces using this balena OpenFleet? https://hub.balena.io/nebraltd/helium-pisces

(still trying to get our hands on a pisces)

radicale commented 2 years ago

I'll try to find some time this weekend. There are other LEDs indeed, but they are only internal so I picked just one of them for testing. I also assigned the button according to some documentation I found, but I honestly can't recall testing it, so I'll check it too.

radicale commented 2 years ago

@radicale any chance you could test with your pisces using this balena OpenFleet? https://hub.balena.io/nebraltd/helium-pisces

Tried this, but ran into a roadblock: Need to enable i2c-0 by adding "i2c_vc=on" dtparam

radicale commented 2 years ago

Ok, so cloning the OpenFleet, adding the above dtparam and setting the VARIANT variable to
"COMP-PISCESP100" works. Regarding the LEDs and Buttons, I've tested the following:

"Reset" gpio5 "BLE-Set" gpio22 "D1" gpio4 (green - active low) "D2" gpio17 (red - active low)

shawaj commented 2 years ago

Thanks @radicale that's fantastic.

Does the reset button just reboot it?

And what do the LEDs do? Is green just for power?

shawaj commented 2 years ago

I've added the DT param to the open fleet now so that should work now https://hub.balena.io/nebraltd/helium-pisces

radicale commented 2 years ago

Does the reset button just reboot it?

No, it's just the silkscreen on the daughter board. It may be wired to something else, but didn't notice anything in particular when pressing. May just be implemented in software, and honestly I don't think that it does anything even in the OEM firmware.

And what do the LEDs do? Is green just for power?

These are all internal to the device on the daughter board. These two LEDs are indicated on the silkscreen as D1 and D2 and don't seem to have specific functionality or meaning, other than what you give them via software.