Compiling errors with ESP32

I’m trying to use Blynk to set up an app to monitor temperatures, humidities, and light using the I2C protocol. The ESP32 works fine when I output data from a digital temperature sensor (TMP42) to the serial port, but when I try to add in the Blynk code all hell breaks loose. The error codes, which are almost unintelligible to me (I’m not a programmer) suggest that Blynk doesn’t like the LibTempTMP421.h library, throwing a slew of messages like:

**image/Users/michaelreid/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkParam.h:307:10: note: no known conversion for argument 1 from ‘LibTempTMP421’ to ‘unsigned int’**
**/Users/michaelreid/Documents/Arduino/libraries/Blynk/src/Blynk/BlynkParam.h:313:10: note: candidate: void BlynkParam::add(long int)**
** void BlynkParam::add(long value)**

Here’s the code that I’m testing:

#include "LibTempTMP421.h"
/* ESP & Blynk */
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
//#define BLYNK_DEBUG //enables verbose prints to the serial port
//#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
BlynkTimer timer;
int timerID;

char auth[] = "";

/* WiFi credentials */
char ssid[] = "";
char pass[] = "";

//address of temperature sensor
LibTempTMP421 temp = LibTempTMP421(0); 

void setup()
  Blynk.begin(auth, ssid, pass);
  timerID = timer.setInterval(5000L, gettemp); \\ wait 5 seconds, then call temperature read function
void loop()
void gettemp(void)
  // temperature module
  float tempF = 0;
  tempF = (temp.GetTemperature()*9/5+32);
  Blynk.virtualWrite(10, temp); //virtual pin V10);

I was so excited to watch the video introducing Blynk and the promise that I could have an app running in 5 minutes (or was that 51 seconds?). So far I’ve spent about 5 hours, and am ready to give up! Any suggestions would be greatly appreciated.


Maybe you want to send tempF instead of temp?

Thanks for that catch. But I’m still wondering why the problems with the LibTempTMP421 library?? I notice that BlynkTimer.h is in /libraries and BlynkTimer.cpp is in /tools. Is Blynk expecting the same distribution for other libraries?

How embarrassing… correcting the send parameter to tempF eliminated the compiling problems. Thanks so much (still wondering why that error in the code resulted in the compile error stream, but whatever works…


A syntax error means the compiler doesn’t understand the info as compared to pre-designated “allowed syntax”…

You had designated tempF as the holder of the temp.GetTemperature then tossed in a pre-designated temp as a variable to print, but the compiler already had temp assigned for something else, not a displayable value… ergo, error.