Add new Readme.md

This commit is contained in:
Mathieu 2016-11-13 23:45:18 +01:00 committed by Mathieu Maret
parent 0159f516c7
commit f90fa156db
1 changed files with 24 additions and 0 deletions

24
README.md Normal file
View File

@ -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.h>
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() {
}
```