ESP8266_HIB/README.md

23 lines
437 B
Markdown
Raw Permalink Normal View History

2016-11-13 23:45:18 +01:00
This library is intended to interact with button pluged on a ESP8266 using the Arduino SDK
Code Example
2017-11-20 17:37:17 +01:00
```c++
2016-11-13 23:45:18 +01:00
#include <HIB.h>
2017-11-20 17:37:17 +01:00
HIB *button;
HIB *button2;
2016-11-13 23:45:18 +01:00
2017-11-20 17:37:17 +01:00
void onButtonPressed(uint8_t pin) { Serial.printf("Button %d pressed \n", pin); }
2016-11-13 23:45:18 +01:00
2017-11-20 17:37:17 +01:00
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);
2016-11-13 23:45:18 +01:00
}
2017-11-20 17:37:17 +01:00
void loop() {}
2016-11-13 23:45:18 +01:00
```