From 5c2d27f7dd8385e49d2a0f8740360938e34ce9f2 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Mon, 20 Nov 2017 17:37:17 +0100 Subject: [PATCH] Update README.md --- README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index dad5bb0..e934ee9 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,22 @@ This library is intended to interact with button pluged on a ESP8266 using the Arduino SDK Code Example -```Arduino +```c++ #include -HIB *button ; -HIB *button2 ; +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 onButtonPressed(uint8_t pin) { Serial.printf("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() { -} +void loop() {} + ```