before converting to work with sliders,yes he sent and print in serial monitor.
I use this code that App Inventor sends number and text to ESP32 by Firebase. ESP32 also sends to App Inventor random numbers
and try to converting to work with sliders.
after converting ,no error,firebase show values of 2 sliders,but serial show nothing.
i use code in 4# post
// Juan A. Villalpando
// http://kio4.com/arduino/117_Wemos_Firebase.htm
#include <FirebaseESP32.h>
#include <WiFi.h>
FirebaseData firebaseData;
const char* ssid = "Nombre_de_tu_Red_Wifi";
const char* password = "Clave_Red_Wifi";
String numero = "";
String texto = "";
unsigned long tiempo_actual = 0;
void setup() {
Serial.begin(115200);
delay(10);
Serial.println();
Serial.print("Connecting with ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("WiFi conected. IP: ");
Serial.println(WiFi.localIP());
Firebase.begin("https://kio4b-3c240.firebaseio.com/", "1lzi12VLgSecreto_de_la_base_de_datos");
}
void loop() {
if (Firebase.getString(firebaseData, "/ESP32/numero")) {
String numero_fb = firebaseData.stringData();
if (numero_fb != numero) {
numero = numero_fb;
Serial.println(numero);
}
}
if (Firebase.getString(firebaseData, "/ESP32/texto")) {
String texto_fb = firebaseData.stringData();
if (texto_fb != texto) {
texto = texto_fb;
Serial.println(texto);
}
}
// Send a random number every 3 seconds.
if((millis()-tiempo_actual)>= 3000){
String alea = (String) random(0,100);
tiempo_actual = millis();
Serial.println(alea);
Firebase.setString(firebaseData, "/ESP32/aleatorio", alea);
}
}