ESP32 Bluetooth Slider LED App
Posted: Sun Mar 04, 2018 1:37 am
Hey
I have an app which can read sensor values from the esp32 over BLE and i can also write to the seriell monitor. Now i wanted to make an Slider to controll the brightness of a LED. I found an nice example but it didnt work for me because he uses a arduino101 and has the analogWrite command which dont work on esp. (btw: im using ESP32_BLE_UART example)
has some one a idea ?
I have an app which can read sensor values from the esp32 over BLE and i can also write to the seriell monitor. Now i wanted to make an Slider to controll the brightness of a LED. I found an nice example but it didnt work for me because he uses a arduino101 and has the analogWrite command which dont work on esp. (btw: im using ESP32_BLE_UART example)
Code: Select all
if (switchCharacteristic.written()) {
Serial.println(switchCharacteristic.value());
int light = map(switchCharacteristic.value(),10,49,0,255);
analogWrite(lightPin,light);