#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = " yJS8PBaRbQiBYzN6a4aULZp9Farz6qGu";
char wifi[] = "fakulte_2"; //Blynk uygulamasının bize vermiş olduğu token ve bağlanmak istediğimiz wifi ve şifresini char komutu ile belirliyoruz.
char wifipass[] = "19apart20fakulte..";
int value ;
int volume; // okuma yapacağımız nem değerini deger değişkeni olarak belirliyoruz
#define sensor A0
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Blynk.begin(auth, wifi, wifipass);
}
void loop() {
// put your main code here, to run repeatedly:
value = analogRead(sensor);
volume = map(value , 0, 1023, 0, 100);
Blynk.virtualWrite (V1, volume);
Blynk.run();
}
Before you do anything else, read the link that @John93 provided and make the necessary changes.
You are breaking the golden rule of Blynk, which is never put a Blynk.virtualWrite() command in your void loop. Once you’ve read the “keep your void loop clean” link then you’ll understand why this isn’t acceptable, and what you need to do to fix this.
Once you’ve done than then…
You have a leading space in your auth token. As a result, if you opened your serial monitor, you would have probably seen an “Invalid auth token” message.
You’ll also find that the sensor you are using corrodes very quickly.
One way to mitigate this is to not provide Vcc to the sensor when it’s not in use, and not to take frequent readings.
If you connect Vcc on the sensor to a GPIO, then keep that LOW (off) until you want to take a reading, then make it HIGH (3.3v) just before taking a reading, then it’s like will be somewhat longer.
I’d start by disconnecting everything except the USB cable, and setting the serial monitor to 74880 and pushing the RST button on your board.
You should then see the boot message from the board.
i wrote like this code and nothing see serial screen again
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "yJS8PBaRbQiBYzN6a4aULZp9Farz6qGu";
char wifi[] = "iPhone";
char wifipass[] = "alaaddin";
void setup() {
// put your setup code here, to run once
Serial.begin(9600);
Blynk.begin(auth, wifi, wifipass);
}
void loop() {
// put your main code here, to run repeatedly:
Sounds like you have a hardware issue - maybe with your board, your USB serial cable or your computer.
As the cable has worked for the sketch upload then that seems unlikely.
Try the board with different cables, different USB ports, and a different computer if possible. Also try every available baud rate in the IDE’s serial monitor to see if you get anything (even garbage is good).
If none of these produce any output then your board is probably faulty.