balena-io-hardware / testbot-sdk-sw

Node SDK for controlling and performing operations with testbot
https://www.npmjs.com/package/@balena/testbot
Apache License 2.0
4 stars 0 forks source link

automatically determine PSU address #11

Open rcooke-warwick opened 3 years ago

rcooke-warwick commented 3 years ago

Depending on the PSU board revision (B.01 vs B.02), the I2C address of the PSU baord is different. At the moment, we assume B.02 (address 0x61), and require the user to add a device variable TESTBOT_PSU_ADDRESS = 0x60 if they have a B.01. We have this in the getting started guide, but it often gets overlooked - so we should figure out a way to automatically determine the revision of the PSU, so the user doesn't have to set the env variable