Continuing the discussion from Arduino uno and EthernetShield with new Blynk 2.0:
Arduino Uno R3 + W5100: Using the sketch from Blynk Example, Blynk library is the most recent from GitHub. Programming Arduino via USB. The result is: despite the configuration as “connection type” ==> Ethernet, the device turns offline in Dashbord if I unplug the usb cable and/or I close the blynk-ser.bat script. So, the system becomes offline if without the usb connection. What can I do ? Many thanks in advance.
Personally, I’d suggest using the WiFi connection method instead of the ethernet connection method. I’d also suggest changing the hardware to a nodemcu or esp32 instead of the Arduino uno.
@rcgismondi I’ve turned your PM into a public post. Please don’t use PM’s in future.
If you’re using the blynk-ser.bat script then your sketch presumably has
#include <BlynkSimpleStream.h> as the included Blynk connection library rather than…
Is that correct?
I am using #include <BlynkSimpleStream.h>. Curious is that despite the option to ethernet as “connection type”, with an ethernet connection the dashboard becomes offline, but if the usb cable is installed and the script running, the dashboard turns online.
Are you choosing this in the template setup?
If so, it has no bearing on what your device does.
The code in your sketch is what tells your device who h connection type to use, and you’ve chosen a code example for USB rather than Ethernet.
If you look at the Sketch Builder exam0les, and choose Uno + W5100 them you’ll have the correct basis for your sketch…
Dear Pete, I am using, carefully, the exact Arduino Uno + W5100 code from Blynk Example … That’s what impresses me the most.
But that code doesn’t include
#include <BlynkSimpleStream.h> which you have said you are using…
Excuse me. That was a mistake. The code is <BlynkSimpleEthernet.h>, and not <BlynkSimpleStream.h>.
I think you need to start from the very beginning.
Post your code and serial monitor output, correctly formatted with triple backticks at the beginning and end of each.
Triple backticks look like this:
Also, provide details of which Blynk library version you are using, and full details of EXACTLY what hardware you are using.
Dear Pete, you gave me some valuable insights about my project/sketch. I will study a bit more the libraries and language. If necessary, I will ask for help again. Many thanks.
Post your complete sketch next time, easier to help you then