guys, anyone knows what this error means? i try to re-compile an older code (i wrote ~5 months ago). but i’ve got this error:
BLYNK_WRITE:1: error: variable or field 'BlynkWidgetWrite100' declared void
BLYNK_WRITE(V100)
^
BLYNK_WRITE:1: error: 'BlynkReq' was not declared in this scope
BLYNK_WRITE(V100)
^
BLYNK_WRITE:1: error: expected primary-expression before 'const'
BLYNK_WRITE(V100)
^
Using library Sonoff at version 2.4.0-rc2-54 in folder: C:\ARDUINO\libraries\Sonoff
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\wanek\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0-rc2\libraries\ESP8266WiFi
Using library ESP8266mDNS in folder: C:\Users\wanek\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0-rc2\libraries\ESP8266mDNS (legacy)
Using library ArduinoOTA at version 1.0 in folder: C:\Users\wanek\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0-rc2\libraries\ArduinoOTA
Using library ESP8266HTTPClient at version 1.1 in folder: C:\Users\wanek\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0-rc2\libraries\ESP8266HTTPClient
Using library ESP8266httpUpdate at version 1.1 in folder: C:\Users\wanek\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0-rc2\libraries\ESP8266httpUpdate
Using library Blynk at version 0.5.0 in folder: C:\ARDUINO\libraries\Blynk
Using library Time at version 1.5 in folder: C:\ARDUINO\libraries\Time
Using library EEPROM at version 1.0 in folder: C:\Users\wanek\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0-rc2\libraries\EEPROM
Using library DallasTemperature at version 3.7.9 in folder: C:\ARDUINO\libraries\DallasTemperature
Using library DHT_sensor_library at version 1.3.0 in folder: C:\ARDUINO\libraries\DHT_sensor_library
Using library Adafruit_Sensor at version 1.0.2 in folder: C:\ARDUINO\libraries\Adafruit_Sensor
exit status 1
variable or field 'BlynkWidgetWrite100' declared void
on the V100 i have a “time input” widget, with the following code:
BLYNK_WRITE(V100)
{
TimeInputParam t(param);
if (t.hasStartTime()) { // Process start time
armedStartH = t.getStartHour();
armedStartM = t.getStartMinute();
}
else if (t.isStartSunrise()) {}
else if (t.isStartSunset()) {}
if (t.hasStopTime()) { // Process stop time
armedStopH = t.getStopHour();
armedStopM = t.getStopMinute();
}
else if (t.isStopSunrise()) {}
else if (t.isStopSunset()) {}
for (byte i = 1; i <= 7; i++) { // Process weekdays (1. Mon, 2. Tue, 3. Wed)
if (t.isWeekdaySelected(i)) weekdaySelected[i] = true;
else weekdaySelected[i] = false;
}
terminal.println(" ");
terminal.flush();
terminal.println(getTime() + "arm all at " + armedStartH + ":" + armedStartM);
terminal.flush();
terminal.println(String("disarm all at ") + armedStopH + ":" + armedStopM);
terminal.flush();
}
@vshymanskyy, ok, based on the “minimal sketch” idea i’ve done some experiments, and it seems i could isolate / reproduce the problem. so, this is my “minimal sketch” (maybe it could be even more minimal, but it is good to go):
I’ve not tried tweaking the code to write the voltage readings to Blynk or the serial monitor, so I don’t know if it truly fixes the problem - I need a coffee and some breakfast first!
Still, my sketch with the same ADC_MODE(ADC_VCC); not only compiles, but works…
I have had strange compiling errors from something as simple as leaving an IDE open too long (save, close and reopen exact same script and works again)… and even chased issues around for over an hour once, tearing apart multiple scripts, before realising the fault was the latest update of the Dallas 1-wire library… reverted back and everything compiling again.
I am amazed these things work anyhow… so naughty and complex