Hi all-
A question I couldn't find answered; perhaps my search terms were incorrect.
If you have an Octolively system, and would like external inputs (and/or outputs), what is the best way to do this?
You could reprogram the system, via the ISP, but that would leave you with the current sensors. Could you somehow use an Arduino (with its own sensors, inputs, outputs, shields, etc) to talk to the Octolively via that 6 pin connector? I see "Programming interface: Standard 6-pin AVR ISP (ICSP/SPI)", which sounds like you can use SPI (my own experience has been with I2C, but the idea of using SPI seems like it would work). Have the Arduino handle sensors and other stuff, have the Octolively handle the lights.
Thoughts on this scheme?
Comments
I see that the lovely USBtinyISP kit is needed to reprogram the Octolively, if needed. Time to procure one posthaste.
Is the source code just what is at github? This does seem to have the current functionality, but don't see how SPI commands would be interpreted (unless I'm missing something completely here).
https://github.com/oskay/Octolively/blob/master/firmware/octolively.c
I do see that pins PB5, PB6, and PB7 are 'free', in that once new code is downloaded, they could be used. If we were to reprogram the Octolively, perhaps those could be used as I/O pins. I see this lovely bit (no pun intended) here in the code, which is hooked up to Pin B5, so a similar piece of code could be used for inputs using PB6 and PB7: I also see: which apparently handles inputs PB1 through 4, but they are used for between board communication. Haven't *quite* figured out how to configure an output, though. I think I need to look at the code at this point for that, it seems that might be the ticket:
I think the input stuff can be figured out by a copy/paste of the readButton; just have to figure out how to do output.
A.