How to use a gpio

@shensley , Thank you for pointing out that the DaisyDuino library is the one that must be installed to use properly.

@Deeek777 , I strongly recommend a walk through the vMicro tutorials. I balked at first and then I gave in and did a cursory review that gave me at least 90% of the answers I was looking for.

2 Likes

@TGargasz and @shensley, thank you so much for the information and clarification! I’ll give the vMicro tutorials a look.

1 Like

incase anyone else needs to update their GPIO code after the v8.0.0 update which uses the pin structs with port / number format. the assignments from MCU pins (D0, D1, D2 etc) to (PORTB, 12) are in the daisy_seed.h header file line 198

hopefully that spares you the headache of combing through the .cpp file wondering where the assignments were (in the header of course!)

quick c&p here for convenience:

constexpr Pin D0 = Pin(PORTB, 12);
constexpr Pin D1 = Pin(PORTC, 11);
constexpr Pin D2 = Pin(PORTC, 10);
constexpr Pin D3 = Pin(PORTC, 9);
constexpr Pin D4 = Pin(PORTC, 8);
constexpr Pin D5 = Pin(PORTD, 2);
constexpr Pin D6 = Pin(PORTC, 12);
constexpr Pin D7 = Pin(PORTG, 10);
constexpr Pin D8 = Pin(PORTG, 11);
constexpr Pin D9 = Pin(PORTB, 4);
constexpr Pin D10 = Pin(PORTB, 5);
constexpr Pin D11 = Pin(PORTB, 8);
constexpr Pin D12 = Pin(PORTB, 9);
constexpr Pin D13 = Pin(PORTB, 6);
constexpr Pin D14 = Pin(PORTB, 7);
constexpr Pin D15 = Pin(PORTC, 0);
constexpr Pin D16 = Pin(PORTA, 3);
constexpr Pin D17 = Pin(PORTB, 1);
constexpr Pin D18 = Pin(PORTA, 7);
constexpr Pin D19 = Pin(PORTA, 6);
constexpr Pin D20 = Pin(PORTC, 1);
constexpr Pin D21 = Pin(PORTC, 4);
constexpr Pin D22 = Pin(PORTA, 5);
constexpr Pin D23 = Pin(PORTA, 4);
constexpr Pin D24 = Pin(PORTA, 1);
constexpr Pin D25 = Pin(PORTA, 0);
constexpr Pin D26 = Pin(PORTD, 11);
constexpr Pin D27 = Pin(PORTG, 9);
constexpr Pin D28 = Pin(PORTA, 2);
constexpr Pin D29 = Pin(PORTB, 14);
constexpr Pin D30 = Pin(PORTB, 15);