Open dadr opened 3 years ago
The issue is that it will make it less deterministic. However, it seems that development of Rasbian has added some cool stuff, including multiple i2c buses :) See https://www.instructables.com/Raspberry-PI-Multiple-I2c-Devices/ so it might be doable to use another i2c bus and free up GPIO3 to be used for on/off and not having to pick one or the other. Have yet to try it myself though
That's a very interesting link. Given this capability really works, I think it makes sense to use GPIO3 (pin 5) for on/off. I've been planning to use GPIO18 (pin 12) for PWM to change brightness on LCD inverters. (Just haven't gotten around to doing that yet ;-) So maybe use GPIO 17 for SDA and 27 for SCL (Pins 13 & 15) for the photo module, and make that bus 3. We could also set up GPIO 23 for SDA and 24 for SCL on a bus 4 to potentially support some additional device with duplicate address (or not). I had also intended to try adding a temperature and humidity module, but I think that it can share the bus with the photo module. Lastly, for completeness, I enable i2C-2 in order to talk to monitors that can adjust brightness and color temp. It does not interfere with the above, but the bus does get exposed to the OS - where the default is not.
Photoframe had pin 37 (GPIO 26) used for shutdown, but then the default was changed to pin 5 (GPIO 3) because that one can also restart a halted system. But, pin 3 conflicts with the color module i2c bus. As I was updating the readme to explain this, it occurred to me that it should be possible to try to detect the photo module first, and then default the shutdown to GPIO 3 or 26 accordingly.