Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • emsfly

    Thanks; that’s what I thought.

    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.



    Most excellent!    Is there a list of commands/example of using the SPI to talk say, from an Arduino?

    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).


    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:

    int readButton() {
      return (! bit_is_set(PINB, PINB5));

    I also see:

    int receive_from(uint8_t dir)

    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:

    DDRB  = ComOutputMask; // All B Inputs except for pin PB0, our output.
    PORTB = ComOutputMask | ComInputMask; // Pull-ups on input lines, output line high to start.

Viewing 2 posts - 1 through 2 (of 2 total)