Hello everyone,
I need some help with a project I am working on. I am trying to read some data onto Blynk that is being transmitted from a 433Mhz transmitter. My thought process was to store the data being transmitted from the transmitter onto a variable and then use DigitalWrite to send this data onto a virtual Pin. I was unable to read the values on Blynk. Since this is my first time using DigitalWrite and being fairly new to Blynk I wanted to test out a simpler code just to send some static data onto Virtual Pin V6 and see if it works. I have trouble getting this to work too. I just can not see the data on the Widget Label that is configured to V6. It shows a 0. Now my Blynk seems to be configured okay since I am able to read values on Blynk from a moisture sensor that I connected directly to a digital Pin on the same Arduino Uno/connected to same ESP-01.
Here’s my current code where I try to set the numerical value 23 to V6, any help here would be much appreciated. As a first step I just want to ensure I am able to get my DigitalWrite here to work.
#define BLYNK_TEMPLATE_ID ""
#define BLYNK_TEMPLATE_NAME "IOTHome"
#define BLYNK_AUTH_TOKEN ""
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <SPI.h>
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX
ESP8266 wifi(&EspSerial);
#define ESP8266_BAUD 38400
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "";
char pass[] = "";
BlynkTimer timer;
// Your ESP8266 baud rate:
void myTimer(){
int var_v6=23;
Blynk.virtualWrite(V6,var_v6);
}
void setup()
{
Serial.begin(38400);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass, "blynk.cloud", 80);
timer.setInterval(1000L, myTimer);
}
void loop()
{
Blynk.run();
timer.run();
}
Here is the error I am getting. I tried changing the cable etc. resetting Uno, restarting etc. and none of them seems to resolve this issue. But I’m not certain this is what is causing the Blynk to not receive values.
Error:
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users//Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/Users//.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.wchusbserial14200
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1c
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
avrdude done. Thank you.