-
Mon 2019.07.29
RATS!! You would have to spoil our spacey dreams with an actual reliable way that would work, @Gordon ! wink, wink ;-)
All kidding aside, thank you for detailing how we ought to be doing this task. For my project, running short of pins and didn't want to add a MUX chip as well. But it is nice to have confirmation on how it should be done. Thank you for detailing that snippet.
rethink and redesign underway. . . .
For the I2C slave, you could take a look at
setWatch
'sdata
pin option (so you setWatch SCL and use SDA for data) - although things may still be a bit tricky to get it working nicely.What I always suggest for things like this is just to use Serial communications with the UART. This generally works really nicely:
opendrain
Create some kind of software system to ensure that the slaves only write data when they're asked to by the master. The simplest is just to use the built-in JS REPL to execute code that does some kind of
if (id=myId) doSomething()
type thing: