There's no output, can someone help me to figure out whats wrong?


 This example shows how value can be pushed from Arduino to
 the Blynk App.

 WARNING :
 For this example you'll need Adafruit DHT sensor libraries:
   https://github.com/adafruit/Adafruit_Sensor
   https://github.com/adafruit/DHT-sensor-library

 App project setup:
   Value Display widget attached to V5
   Value Display widget attached to V6
*************************************************************/

// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud
// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID "TMPL4Cvekawb"
#define BLYNK_DEVICE_NAME "Water Quality"
#define BLYNK_AUTH_TOKEN "V9bTsvdXRzmSSQ4BfYVhC_nEN3N4ZMAA"


// Comment this out to disable prints and save space


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <OneWire.h>
#include <DallasTemperature.h> 
#define BLYNK_PRINT Serial

char auth[] = BLYNK_AUTH_TOKEN;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Pro";
char pass[] = "12345678";

BlynkTimer timer;
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature DS18B20(&oneWire);
const int analogpin = A0;
float temp; 


void setup()
{
 // Debug console
 Serial.begin(115200);
  DS18B20.begin();
 Blynk.begin(auth, ssid, pass);
 timer.setInterval(5000L, getSendData);
}

void loop()
{
 
 float turbidity = analogRead(A0);
 float volt = turbidity;


 Blynk.run();
 timer.run();
}

void getSendData()
{
 float turbidity = analogRead(A0);
 float volt = turbidity;
 DS18B20.requestTemperatures(); 
 temp = DS18B20.getTempCByIndex(0); // Celcius

 
  Serial.print("Temperature: ");
 Serial.print(temp);
 Serial.print(" \xC2\xB0"); // shows degree symbol
 Serial.print("C  |  ");
 Serial.print("Turbidity: ");
 Serial.println(volt);
 Blynk.virtualWrite(V0, volt);
 Blynk.virtualWrite(V3, temp); //virtual pin V3
}

Please edit your post, and add triple backticks ``` before and after your whole sketch.

already ok

Is your device online?
What does your serial monitor show? (Copy the text and paste with triple backticks)

You need to remove this from your void loop…

What hardware are you using?

How have you configured your datastreams for V0 and V3, and what widgets do you have connected to them?

Pete.

im using Nodemcu esp8266, v0 is for turbidty sensor, v3 is for ds18b20 temperature sensor. im using gauge widget for both sensor

Do you think that this answers my questions?

Pete.

i already configured the datastream, my problem is theres no output and my blynk console
didnt get online, or maybe because i only using hostpot?

So, so far you’ve answered this question…

That just leaves…

and

If you don’t want to provide answers to then questions then that’s fine, just say so.
But, I won’t keep asking so if you want help from me then you need to provide the info I’ve asked for.

Pete.

No, its not online

nothing shows in my serial monitor

i configure it in blynk console did i answer it ?

You need to fix that.
Start by checking your port and baud rate, and if they are correct disconnecting everything except your USB cable and trying again.
If that doesn’t work then try a different cable/port.

No, you’ve not told me anything about the configuration settings for these datastreams, despite me asking repeatedly.

Pete.

i dont know what you mean in this part, im sorry

but when i try to run it not using the blynk its working.

This…

What changes are you making to your sketch to make it so that it’s “not using Blynk” and what do you see in your serial monitor in this situation?

Pete.

when in not using blynk this the output in serial monitor


#include <OneWire.h>
#include <DallasTemperature.h>

const int SENSOR_PIN = 2; // Arduino pin connected to DS18B20 sensor's DQ pin

OneWire oneWire(SENSOR_PIN);         // setup a oneWire instance
DallasTemperature tempSensor(&oneWire); // pass oneWire to DallasTemperature library

float tempCelsius;    // temperature in Celsius
float volt;

void setup()
{
  Serial.begin(115200); // initialize serial
  tempSensor.begin();    // initialize the sensor
}

void loop()
{
 
  float turbidity = analogRead(A0);
  float volt = turbidity*(5.0 / 1024.0);
  tempSensor.requestTemperatures();             // send the command to get temperatures
  tempCelsius = tempSensor.getTempCByIndex(0);  // read temperature in Celsius

 
  Serial.print("Turbidity: ");
  Serial.print(volt);
  Serial.print(" Temperature: ");
  Serial.print(tempCelsius);    // print the temperature in Celsius
  Serial.println("°C");
 
  
  delay(1000);
}

this is the changes

In response to this question you’ve posted a screenshot!

When you upload the Blynk sketch, open the serial monitor and press the RST button on your board, are you saying that you see absolutely no output in your serial monitor?

Pete.

yes theres no output, but when i press the RST button theres something in serial monitor

rl

this one

You need to put triple backticks above and below your code/serial output for them to work!

What happens if you move this line of code…

Up to its original position which is immediately after this comment…

and before your library #include lines of code?

Also, would you please change this line…

To this…
Serial.begin(74880);
[/quote

and adjust your serial monitor baud rate to the same setting.
This should allow you to see the boot messages from your board as well as the debug messages from your sketch.

When you’ve made these changes please upload the new sketch, open the serial monitor, press the RST button then copy everything that appears in your serial monitor and paste it between triple backticks. Don’t leave any of your serial output out because you think that it’s irrelevant or meaningless.

Pete.


 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 3460, room 16 
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4 
tail 4
chksum 0xc9
csum 0xc9
v00047150
~ld
[104] Connecting to Pro

this the thing appear in serial monitor when i press the reset button

When you compile your sketch do you see compiler messages about multiple versions of certain library files being found?

At the end of the compilation process, before the upload begins, is there a list of libraries used and their versions and file paths?

If so, could you please copy/paste this info (with triple backticks as usual).

Pete.

Executable segment sizes:
ICACHE : 32768           - flash instruction cache 
IROM   : 254740          - code in flash         (default or ICACHE_FLASH_ATTR) 
IRAM   : 28261   / 32768 - code in IRAM          (IRAM_ATTR, ISRs...) 
DATA   : 1552  )         - initialized variables (global, static) in RAM/HEAP 
RODATA : 2448  ) / 81920 - constants             (global, static) in RAM/HEAP 
BSS    : 26472 )         - zeroed variables      (global, static) in RAM/HEAP 
Sketch uses 287001 bytes (27%) of program storage space. Maximum is 1044464 bytes.
Global variables use 30472 bytes (37%) of dynamic memory, leaving 51448 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port COM6
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: a8:48:fa:ff:00:fa
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 291152 bytes to 212485...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 291152 bytes (212485 compressed) at 0x00000000 in 18.8 seconds (effective 124.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

no only like this…

there’s a possibilty that my code did not working because im only using hotspot and my nodemcu cant connect to the internet ?