I2Cwrapper v0.3.0
Generic framework for Arduino I2C target devices
_addressFromPins_firmware.h File Reference

Feature module. Makes the target retrieve its own address from the input state of one or more pins at startup, so that the end user can change it e.g. with solder bridges or DIP switches. To adapt for your specific needs, you'll have to change the following values below: More...

Detailed Description

Feature module. Makes the target retrieve its own address from the input state of one or more pins at startup, so that the end user can change it e.g. with solder bridges or DIP switches. To adapt for your specific needs, you'll have to change the following values below:

  • I2CaddressOffset - base address when all pins are inactive
  • I2CaddressPins - array of 1 to 7 pins, LSB pin first
  • I2CaddressPinsActiveLow - true for HIGH = 0, LOW = 1
  • I2CaddressPinsPullup - true to use internal pullups for address pins. Important: Without internal pullups, you must not leave pins floating, or you'll get a random address!

Author

Copyright (c) 2022 juh

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.