i trying to build a waste management but i can i need help
please i have try connecting to the cayenne for days but it still says " waiting for the board to connect" i really need help here
this is the code
#include <Ultrasonic.h>
#include <ESP8266WiFi.h>
#include <HCSR04.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
#include <CayenneMQTTESP8266.h>
char ssid = “THINK TWICE DATA”;
char password = “royalmax”;
char username = “1ceb3da0-04f9-11ed-bbc1-5d0b0fa0a668”;
char mqtt_password = “9c9e7cabd25715aaf0db80f9ebfc7cafcb2cc76f”;
char client_id = “bd2b3ed0-05b9-11ed-bbc1-5d0b0fa0a668”;
#define MAX_HEIGHT 24
int Percentage;
UltraSonicDistanceSensor distanceSensor(V5, V6);
void setup(void) {
Serial.begin(115200);
Cayenne.begin(username, mqtt_password, client_id, ssid, password);
delay(1000);
lcd.init();
lcd.backlight();
}
void loop() {
Cayenne.loop();
float actualCM = 1 * distanceSensor.measureDistanceCm();
Percentage = (MAX_HEIGHT - actualCM) / (MAX_HEIGHT - 5) * 100 ;
Serial.println(Percentage);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" IOT Smart BIN “);
lcd.setCursor(0, 1);
lcd.print(“Waste Fill:”);
lcd.setCursor(11, 1);
lcd.print(Percentage);
lcd.setCursor(13, 1);
lcd.print(” % ");
delay(1000);
Cayenne.virtualWrite(1, Percentage);
if (Percentage >= 100)
{ lcd.setCursor(11, 1);
lcd.print("FULL ");
delay(1000);
}
}