convert from this coding below to mbed c++ #define BLYNK_DEVICE_NAME "NodeMCU" #define BLYNK_AUTH_TOKEN "oLt-Y2bvgoy22dT9JP2ZIuLR1MDr9n4h" #define BLYNK_PRINT Serial #define BLYNK_MAX_SENDBYTES 256 #include #include #include "dht.h" #define dht_apin D5 // Analog Pin sensor is connected to #define sensorPin A0 // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "oLt-Y2bvgoy22dT9JP2ZIuLR1MDr9n4h";
hello can you convert from this coding below to mbed c++
#define BLYNK_DEVICE_NAME "NodeMCU"
#define BLYNK_AUTH_TOKEN "oLt-Y2bvgoy22dT9JP2ZIuLR1MDr9n4h"
#define BLYNK_PRINT Serial
#define BLYNK_MAX_SENDBYTES 256
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "dht.h"
#define dht_apin D5 // Analog Pin sensor is connected to
#define sensorPin A0
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "oLt-Y2bvgoy22dT9JP2ZIuLR1MDr9n4h";
char ssid[] = "nizammustafa";
char pass[] = "nizamkillerz17";
dht DHT;
int sensorValue = 0;
int safetyValue;
int humidity;
int val = 0;
const int trigPin = D3;
const int echoPin = D2;
const int ledPin1 = D8;
const int ledPin2 = D7;
const int ledPin3 = D6;
// defines variables
long duration;
int distance;
int safetyDistance;
void setup() {
Serial.begin(9600); // Starts the serial communication;
Blynk.begin(auth, ssid, pass);
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
pinMode(ledPin3, OUTPUT);
Serial.print("Water Level Sensor Activated");
Serial.print("DHT11 Humidity & temperature Sensor Activated\n\n");
delay(1000);//Wait before accessing Sensor
}
Step by step
Solved in 2 steps