This site is mentioned in SerialSoftware header so I am posting this here.
I am trying to use pins_arduino.h and having heck of a time.
I can get the pin (A0) identified using this snippet in Setup:
// setup selector button
pinMode(A0, INPUT_PULLUP); // Connect to a button that goes to GND on push
#if DEBUG
debugFunction ("selector");
#endif
PCattachInterrupt(A0, SelectButton , CHANGE); // A0 = pin 8
#if DEBUG
debugFunction ("Attach interrupt selector");
#endif
I can get thru PCattachInterrupt(A0, SelectButton , CHANGE); and identify the pin 8.
I don't fully get what PCattachInterrup does ( slot?).
But I do not get to SelectButton at all when A0 goes to ground. No interrupt.
I just started using Arduino ( Uno) and have been "doing computers" since 1973.
I am little surprised how scantly are Arduino files documented / commented since it appears that the product is intended / geared for audience with lots of dreams who has a hard time to read. ( Perhaps why bother to write documentation nobody reads!)
On top of this, there are at least two of header files dealing with assigning interrupts to pins.
I could use some real sample how this header is used.
Thanks
Cheers
Vaclav
I am trying to use pins_arduino.h and having heck of a time.
I can get the pin (A0) identified using this snippet in Setup:
// setup selector button
pinMode(A0, INPUT_PULLUP); // Connect to a button that goes to GND on push
#if DEBUG
debugFunction ("selector");
#endif
PCattachInterrupt(A0, SelectButton , CHANGE); // A0 = pin 8
#if DEBUG
debugFunction ("Attach interrupt selector");
#endif
I can get thru PCattachInterrupt(A0, SelectButton , CHANGE); and identify the pin 8.
I don't fully get what PCattachInterrup does ( slot?).
But I do not get to SelectButton at all when A0 goes to ground. No interrupt.
I just started using Arduino ( Uno) and have been "doing computers" since 1973.
I am little surprised how scantly are Arduino files documented / commented since it appears that the product is intended / geared for audience with lots of dreams who has a hard time to read. ( Perhaps why bother to write documentation nobody reads!)
On top of this, there are at least two of header files dealing with assigning interrupts to pins.
I could use some real sample how this header is used.
Thanks
Cheers
Vaclav