Skip to content

Commit c96bc0e

Browse files
committed
Fixed USE_NIMBLE
1 parent 183afac commit c96bc0e

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

BleKeyboard.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "BleKeyboard.h"
2+
13
#if defined(USE_NIMBLE)
24
#include <NimBLEDevice.h>
35
#include <NimBLEServer.h>
@@ -14,7 +16,6 @@
1416
#include <driver/adc.h>
1517
#include "sdkconfig.h"
1618

17-
#include "BleKeyboard.h"
1819

1920
#if defined(CONFIG_ARDUHAL_ESP_LOG)
2021
#include "esp32-hal-log.h"

BleKeyboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// uncomment the following line to use NimBLE library
2+
//#define USE_NIMBLE
3+
14
#ifndef ESP32_BLE_KEYBOARD_H
25
#define ESP32_BLE_KEYBOARD_H
36
#include "sdkconfig.h"

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,13 @@ Flash: [==== ] 44.2% (used 579158 bytes from 1310720 bytes)
137137
| `ESP.getFreeHeap()` | 143.572 | 260.764 | **+ 117.192** |
138138
| `ESP.getSketchSize()` | 994.224 | 579.264 | **- 414.960** |
139139

140-
### How to activate NimBLE mode?
140+
## How to activate NimBLE mode?
141141

142-
ArduinoIDE: Before including the library, insert the line `#define USE_NIMBLE`
143-
```C++
144-
#define USE_NIMBLE
145-
#include <BleKeyboard.h>
146-
```
142+
### ArduinoIDE:
143+
Edit BleKeyboard.h and remove and uncomment the first line `#define USE_NIMBLE`
147144

148-
PlatformIO: Change your `platformio.ini` to the following settings
145+
### PlatformIO:
146+
Change your `platformio.ini` to the following settings
149147
```ini
150148
lib_deps =
151149
NimBLE-Arduino

0 commit comments

Comments
 (0)