-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from NicoHood/dev
Release 1.2.4
- Loading branch information
Showing
6 changed files
with
126 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 24 additions & 24 deletions
48
examples/PinChangeInterrupt_Led/PinChangeInterrupt_Led.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
/* | ||
Copyright (c) 2014-2015 NicoHood | ||
See the readme for credit to other people. | ||
Copyright (c) 2014-2015 NicoHood | ||
See the readme for credit to other people. | ||
PinChangeInterrupt_TickTock | ||
Demonstrates how to use the library | ||
PinChangeInterrupt_TickTock | ||
Demonstrates how to use the library | ||
Connect a button/cable to pin 7 and ground. | ||
The Led state will change if the pin state does. | ||
Connect a button/cable to pin 7 and ground. | ||
The Led state will change if the pin state does. | ||
PinChangeInterrupts are different than normal Interrupts. | ||
See readme for more information. | ||
Dont use Serial or delay inside interrupts! | ||
This library is not compatible with SoftSerial. | ||
PinChangeInterrupts are different than normal Interrupts. | ||
See readme for more information. | ||
Dont use Serial or delay inside interrupts! | ||
This library is not compatible with SoftSerial. | ||
The following pins are usable for PinChangeInterrupt: | ||
Arduino Uno/Nano/Mini: All pins are usable | ||
Arduino Mega: 10, 11, 12, 13, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), | ||
The following pins are usable for PinChangeInterrupt: | ||
Arduino Uno/Nano/Mini: All pins are usable | ||
Arduino Mega: 10, 11, 12, 13, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), | ||
A11 (65), A12 (66), A13 (67), A14 (68), A15 (69) | ||
Arduino Leonardo/Micro: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI) | ||
HoodLoader2: All (broken out 1-7) pins are usable | ||
Attiny 24/44/84: All pins are usable | ||
Attiny 25/45/85: All pins are usable | ||
Attiny 13: All pins are usable | ||
Attiny 441/841: All pins are usable | ||
ATmega644P/ATmega1284P: All pins are usable | ||
Arduino Leonardo/Micro: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI) | ||
HoodLoader2: All (broken out 1-7) pins are usable | ||
Attiny 24/44/84: All pins are usable | ||
Attiny 25/45/85: All pins are usable | ||
Attiny 13: All pins are usable | ||
Attiny 441/841: All pins are usable | ||
ATmega644P/ATmega1284P: All pins are usable | ||
*/ | ||
|
||
#include "PinChangeInterrupt.h" | ||
|
||
// choose a valid PinChangeInterrupt pin of your Arduino board | ||
// Choose a valid PinChangeInterrupt pin of your Arduino board | ||
#define pinBlink 7 | ||
|
||
void setup() { | ||
// set pin to input with a pullup, led to output | ||
pinMode(pinBlink, INPUT_PULLUP); | ||
pinMode(LED_BUILTIN, OUTPUT); | ||
|
||
// attach the new PinChangeInterrupt and enable event function below | ||
// Attach the new PinChangeInterrupt and enable event function below | ||
attachPCINT(digitalPinToPCINT(pinBlink), blinkLed, CHANGE); | ||
} | ||
|
||
void blinkLed(void) { | ||
// switch Led state | ||
// Switch Led state | ||
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); | ||
} | ||
|
||
void loop() { | ||
// nothing to do here | ||
// Nothing to do here | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=PinChangeInterrupt | ||
version=1.2.3 | ||
version=1.2.4 | ||
author=NicoHood | ||
maintainer=NicoHood <[email protected]> | ||
sentence=A simple & compact PinChangeInterrupt library for Arduino. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters