From f90fa156db120f903e42a9be974c85503de51c67 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Sun, 13 Nov 2016 23:45:18 +0100 Subject: [PATCH] Add new Readme.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..dad5bb0 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ +This library is intended to interact with button pluged on a ESP8266 using the Arduino SDK + +Code Example +```Arduino +#include + +HIB *button ; +HIB *button2 ; + +void onButtonPressed(uint8_t pin){ + Serial.printf("Sketch on button %d pressed \n", pin); + } + +void setup() { + Serial.begin(115200); + // put your setup code here, to run once: + button = new HIB(0, HIGH, onButtonPressed); + button2 = new HIB(4, HIGH, onButtonPressed); + +} + +void loop() { +} +```