Script keeps halting (on MEGA via USB link)

Android.

And the MCU?

Sorry. Am using USB connection to a PC on an Arduino Mega board.

How much memory do you have when you compile the sketch and have you checked the memory whilst the sketch is running?

Have you tried a basic Mega with USB sketch to confirm it will run “forever” which would then suggest you have a bad sketch.

You would then need to check small sections of your code to see if you have any bugs.

Ok so i cut the code right down so the only thing running is the light programming section. So basically 4 different menus (lunar, low sun, mid sun and high sun) and 7 channels of lights for different colour LEDs. The save button saves them and the finished/reset button should return the sliders to 0 along with the menu on V1.

It works 80% of the time but now and again it will just stop and not do anything. I don’t know if its not uploading the button pushes to Blynk, or if there is an intimitant problem with my internet connection and the Arduino is ‘missing’ the commands that Blynk is sending it. But the after it ‘misses’ it once, it won’t work again until I disconnect and reconnect it.

The sketch is only taking up 5% of available memory.

The stripped down code is below. Can anyone see why there might be this halting error? Could it be flooding Blynk? Also, if the Arduino is missing the new commands, shouldn’t it be constantly checking the Blynk server for any changes and apply them when it reconnected?

#define BLYNK_PRINT Serial1
//#define ONE_WIRE_BUS_PIN 44   // TEMP SENSORS
//#define BETWEEN 2579          // STORM
//#define DURATION 100          // STORM
//#define TIMES 7               // STORM

#include <BlynkSimpleStream.h>
#include <Wire.h>
#include <Time.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <DS1307RTC.h>
#include <EEPROM.h>

//OneWire oneWire(ONE_WIRE_BUS_PIN);
//DallasTemperature sensors(&oneWire);

//DeviceAddress Probe01 = { 0x28, 0x5E, 0x72, 0xC5, 0x06, 0x00, 0x00, 0xA4 }; 
//DeviceAddress Probe02 = { 0x28, 0x9F, 0x49, 0x2F, 0x06, 0x00, 0x00, 0xAA };
//DeviceAddress Probe03 = { 0x28, 0x7A, 0xFB, 0xC4, 0x06, 0x00, 0x00, 0x79 };

char auth[] = "65b59e***************************5f4166";

//-----Temp Sensors
float tempC01, tempC02, tempC03;
unsigned int tempMillis = millis();

//----- Power Plugs
int pwr1, pwr2, pwr3, pwr4, pwr5, pwr6, pwr7, pwr8, pwr9, pwr10;
int pwrbut1, pwrbut2, pwrbut3, pwrbut4, pwrbut5, pwrbut6, pwrbut7, pwrbut8, pwrbut9, pwrbut10;
int sensorVal1, sensorVal2;
int sump1ontime, sump2ontime, sump1onH, sump1onM, sump2onH, sump2onM, sump1offH, sump1offM, sump2offH, sump2offM;
int sumptimer1active, sumptimer2active;

//----- Storm
unsigned long lastTime = 0;
int waitTime = 0;
int mixer, srumble, brumble, stormstatus=0, stormbutton;
unsigned long stormMillis=0;
unsigned int storm1, storm2, storm3, storm4, storm5, storm6, storm7;

//----- Lighting
int savechangesbut;    // button used to save new light levels
int resetchangesbut;    // button used to reset lighting after editing
int resetarduinobut;   // button used to reset the whooe Arduino

int lightedit=0;       // editing lights? // 0-NOT EDITING  1-EDIT LUNAR  2-EDIT LOWSUN  3-EDIT MIDSUN  4-EDIT HIGHSUN

int led1 = 2;
int led2 = 3;
int led3 = 4;
int led4 = 5;
int led5 = 6;
int led6 = 7;
int led7 = 8;

long lunartolowsunSec, lowsuntomidsunSec, midsuntohighsunSec, highsuntomidsunSec, midsuntolowsunSec, lowsuntolunarSec;
int globalfadedurationM;
unsigned long globalfadedurationS, globalfadedurationMS;

int lunartolowsunStartH, lunartolowsunStartM;            // Start fade times
int lowsuntomidsunStartH, lowsuntomidsunStartM;
int midsuntohighsunStartH, midsuntohighsunStartM;
int highsuntomidsunStartH, highsuntomidsunStartM;
int midsuntolowsunStartH, midsuntolowsunStartM;
int lowsuntolunarStartH, lowsuntolunarStartM;

int fadeInProgress;   // 0=false / 1=yes
int currentLightMode, transitionMode;

unsigned long ch1LightMillis, ch2LightMillis, ch3LightMillis, ch4LightMillis, ch5LightMillis, ch6LightMillis, ch7LightMillis;
int ch1timeincr, ch2timeincr, ch3timeincr, ch4timeincr, ch5timeincr, ch6timeincr, ch7timeincr;
int colorDif1, colorDif2, colorDif3, colorDif4, colorDif5, colorDif6, colorDif7;
unsigned long savelightsMillis = 0;
int butLunar, butLowsun, butMidsun, butHighsun;


struct LEDS // for storing light intensity values
{
  int ch1;
  int ch2;
  int ch3;
  int ch4;
  int ch5;
  int ch6;
  int ch7;
};

typedef struct LEDS LightColor;

LightColor currentColor = {
  0,0,0,0,0,0,0};               // The current color of the light (used for fading)
LightColor lastColor = {
  0,0,0,0,0,0,0};               // The previous color of the light (used for fading)
LightColor targetColor = {
  0,0,0,0,0,0,0};               // The target color of the light (used for fading)
  
LightColor lunar = {            // Lunar colours
  0,0,0,0,0,0,0};             
LightColor lowsun = {           // Lowsun colours
  0,0,0,0,0,0,0};              
LightColor midsun = {           // Midsun colours
  0,0,0,0,0,0,0};               
LightColor highsun = {          // Highsun colours
  0,0,0,0,0,0,0};       
LightColor edit = {             // Used to edit colours
  0,0,0,0,0,0,0};

//----- Feeding
int feeding;

//----- RTC
unsigned long time;
tmElements_t tm; 

//----- Dosing
long dose1startTime, dose2startTime, dose3startTime, dose4startTime;


/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////                                             ///////////////////////
/////////////////////      B  L  Y  N  K    I  N  P  U  T  S      ///////////////////////
/////////////////////                                             ///////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////


BLYNK_WRITE(V1) 
{
  switch (param.asInt())
  {
    case 1: 
    
      lightedit=0;    // 0-NOT EDITING  1-EDIT LUNAR  2-EDIT LOWSUN  3-EDIT MIDSUN  4-EDIT HIGHSUN
      edit.ch1=highsun.ch1;
      edit.ch2=highsun.ch2;
      edit.ch3=highsun.ch3;
      edit.ch4=highsun.ch4;
      edit.ch5=highsun.ch5;
      edit.ch6=highsun.ch6;
      edit.ch7=highsun.ch7;
      Blynk.virtualWrite(V2, edit.ch1);
      Blynk.virtualWrite(V3, edit.ch2);
      Blynk.virtualWrite(V4, edit.ch3);
      Blynk.virtualWrite(V5, edit.ch4);
      Blynk.virtualWrite(V6, edit.ch5);
      Blynk.virtualWrite(V7, edit.ch6);
      Blynk.virtualWrite(V8, edit.ch7);
      showeditleds();
      break;
      
    case 2: // E  D  I  T    L  U  N  A  R    L  I  G  H  T  I  N  G
    
      lightedit=1;    // 0-NOT EDITING  1-EDIT LUNAR  2-EDIT LOWSUN  3-EDIT MIDSUN  4-EDIT HIGHSUN
      edit.ch1=lunar.ch1;
      edit.ch2=lunar.ch2;
      edit.ch3=lunar.ch3;
      edit.ch4=lunar.ch4;
      edit.ch5=lunar.ch5;
      edit.ch6=lunar.ch6;
      edit.ch7=lunar.ch7;
      Blynk.virtualWrite(V2, edit.ch1);
      Blynk.virtualWrite(V3, edit.ch2);
      Blynk.virtualWrite(V4, edit.ch3);
      Blynk.virtualWrite(V5, edit.ch4);
      Blynk.virtualWrite(V6, edit.ch5);
      Blynk.virtualWrite(V7, edit.ch6);
      Blynk.virtualWrite(V8, edit.ch7);
      showeditleds();
      break;
      
    case 3: // E  D  I  T    L  O  W    S  U  N    L  I  G  H  T  I  N  G
    
      lightedit=2;    // 0-NOT EDITING  1-EDIT LUNAR  2-EDIT LOWSUN  3-EDIT MIDSUN  4-EDIT HIGHSUN
      edit.ch1=lowsun.ch1;
      edit.ch2=lowsun.ch2;
      edit.ch3=lowsun.ch3;
      edit.ch4=lowsun.ch4;
      edit.ch5=lowsun.ch5;
      edit.ch6=lowsun.ch6;
      edit.ch7=lowsun.ch7;
      Blynk.virtualWrite(V2, edit.ch1);
      Blynk.virtualWrite(V3, edit.ch2);
      Blynk.virtualWrite(V4, edit.ch3);
      Blynk.virtualWrite(V5, edit.ch4);
      Blynk.virtualWrite(V6, edit.ch5);
      Blynk.virtualWrite(V7, edit.ch6);
      Blynk.virtualWrite(V8, edit.ch7);
      showeditleds();
      break;
      
    case 4: // E  D  I  T    M  I  D    S  U  N    L  I  G  H  T  I  N  G
    
      lightedit=3;    // 0-NOT EDITING  1-EDIT LUNAR  2-EDIT LOWSUN  3-EDIT MIDSUN  4-EDIT HIGHSUN
      edit.ch1=midsun.ch1;
      edit.ch2=midsun.ch2;
      edit.ch3=midsun.ch3;
      edit.ch4=midsun.ch4;
      edit.ch5=midsun.ch5;
      edit.ch6=midsun.ch6;
      edit.ch7=midsun.ch7;
      Blynk.virtualWrite(V2, edit.ch1);
      Blynk.virtualWrite(V3, edit.ch2);
      Blynk.virtualWrite(V4, edit.ch3);
      Blynk.virtualWrite(V5, edit.ch4);
      Blynk.virtualWrite(V6, edit.ch5);
      Blynk.virtualWrite(V7, edit.ch6);
      Blynk.virtualWrite(V8, edit.ch7);
      showeditleds();
      break;
      
    case 5: // E  D  I  T    H  I  G  H    S  U  N    L  I  G  H  T  I  N  G
    
      lightedit=4;    // 0-NOT EDITING  1-EDIT LUNAR  2-EDIT LOWSUN  3-EDIT MIDSUN  4-EDIT HIGHSUN
      edit.ch1=highsun.ch1;
      edit.ch2=highsun.ch2;
      edit.ch3=highsun.ch3;
      edit.ch4=highsun.ch4;
      edit.ch5=highsun.ch5;
      edit.ch6=highsun.ch6;
      edit.ch7=highsun.ch7;
      Blynk.virtualWrite(V2, edit.ch1);
      Blynk.virtualWrite(V3, edit.ch2);
      Blynk.virtualWrite(V4, edit.ch3);
      Blynk.virtualWrite(V5, edit.ch4);
      Blynk.virtualWrite(V6, edit.ch5);
      Blynk.virtualWrite(V7, edit.ch6);
      Blynk.virtualWrite(V8, edit.ch7);
      showeditleds();
      break;
  }
}


BLYNK_WRITE(V2)
{
  edit.ch1 = param.asInt();
  analogWrite(led1, edit.ch1);
}

BLYNK_WRITE(V3)
{
  edit.ch2 = param.asInt();
  analogWrite(led2, edit.ch2);
}

BLYNK_WRITE(V4)
{
  edit.ch3 = param.asInt(); 
  analogWrite(led3, edit.ch3);
}

BLYNK_WRITE(V5)
{
  edit.ch4 = param.asInt(); 
  analogWrite(led4, edit.ch4);
}

BLYNK_WRITE(V6)
{
  edit.ch5 = param.asInt(); 
  analogWrite(led5, edit.ch5);
}

BLYNK_WRITE(V7)
{
  edit.ch6 = param.asInt(); 
  analogWrite(led6, edit.ch6);
}

BLYNK_WRITE(V8)
{
  edit.ch7 = param.asInt(); 
  analogWrite(led7, edit.ch7);
}



BLYNK_WRITE(V9)    // Save Lighting Changes
{
  savechangesbut = param.asInt(); 
  
  if (savechangesbut == 1)
    {
      savevalues();
    }
}

BLYNK_WRITE(V10)    // Save Lighting Changes
{
  resetchangesbut = param.asInt(); 
  
  if (resetchangesbut==1)
    {
      resetlights();
    }
}





void setup() 
{
  Serial1.begin(9600);
  Serial.begin(9600);
 
  //sensors.begin();
  //sensors.setResolution(Probe01, 10);
  //sensors.setResolution(Probe02, 10);
  //sensors.setResolution(Probe03, 10);
  
  pinMode(led1, OUTPUT);  // LED CH1
  pinMode(led2, OUTPUT);  // LED CH2
  pinMode(led3, OUTPUT);  // LED CH3
  pinMode(led4, OUTPUT);  // LED CH4
  pinMode(led5, OUTPUT);  // LED CH5
  pinMode(led6, OUTPUT);  // LED CH6
  pinMode(led7, OUTPUT);  // LED CH7
  
  pinMode(22, OUTPUT); // POWER SECTION
  pinMode(23, OUTPUT); // ----"---"----
  pinMode(24, OUTPUT); // ----"---"----
  pinMode(25, OUTPUT); // ----"---"----
  pinMode(26, OUTPUT); // ----"---"----
  pinMode(27, OUTPUT); // ----"---"----
  pinMode(28, OUTPUT); // ----"---"----
  pinMode(29, OUTPUT); // ----"---"----
  pinMode(30, OUTPUT); // ----"---"----
  pinMode(31, OUTPUT); // ----"---"----
  
  pinMode(51, INPUT_PULLUP);    // Float switch 1
  pinMode(52, INPUT_PULLUP);    // Float switch 2
  
  //uploadToBlynk();
  //startup();
  
  Blynk.begin(Serial, auth);
  
  //resetarduinobut=0;
  //Blynk.virtualWrite(V27, resetarduinobut);
}


void savevalues()        // SAVE VALUES TO EEPROM
{
  if (lightedit==1)    // 0-NOT EDITING  1-EDIT LUNAR  2-EDIT LOWSUN  3-EDIT MIDSUN  3-EDIT HIGHSUN  4-EDIT HIGHSUN
  {
    lunar.ch1=edit.ch1;
    lunar.ch2=edit.ch2;
    lunar.ch3=edit.ch3;
    lunar.ch4=edit.ch4;
    lunar.ch5=edit.ch5;
    lunar.ch6=edit.ch6;
    lunar.ch7=edit.ch7;
    EEPROM.write(1, lunar.ch1);
    EEPROM.write(2, lunar.ch2);
    EEPROM.write(3, lunar.ch3);
    EEPROM.write(4, lunar.ch4);
    EEPROM.write(5, lunar.ch5);
    EEPROM.write(6, lunar.ch6);
    EEPROM.write(7, lunar.ch7);
  }
  else if (lightedit==2)
  {
    lowsun.ch1=edit.ch1;
    lowsun.ch2=edit.ch2;
    lowsun.ch3=edit.ch3;
    lowsun.ch4=edit.ch4;
    lowsun.ch5=edit.ch5;
    lowsun.ch6=edit.ch6;
    lowsun.ch7=edit.ch7;
    EEPROM.write(8, lowsun.ch1);
    EEPROM.write(9, lowsun.ch2);
    EEPROM.write(10, lowsun.ch3);
    EEPROM.write(11, lowsun.ch4);
    EEPROM.write(12, lowsun.ch5);
    EEPROM.write(13, lowsun.ch6);
    EEPROM.write(14, lowsun.ch7);
  }
  else if (lightedit==3)
  {
    midsun.ch1=edit.ch1;
    midsun.ch2=edit.ch2;
    midsun.ch3=edit.ch3;
    midsun.ch4=edit.ch4;
    midsun.ch5=edit.ch5;
    midsun.ch6=edit.ch6;
    midsun.ch7=edit.ch7;
    EEPROM.write(15, midsun.ch1);
    EEPROM.write(16, midsun.ch2);
    EEPROM.write(17, midsun.ch3);
    EEPROM.write(18, midsun.ch4);
    EEPROM.write(19, midsun.ch5);
    EEPROM.write(20, midsun.ch6);
    EEPROM.write(21, midsun.ch7);
  }
  else if (lightedit==4)
  {
    highsun.ch1=edit.ch1;
    highsun.ch2=edit.ch2;
    highsun.ch3=edit.ch3;
    highsun.ch4=edit.ch4;
    highsun.ch5=edit.ch5;
    highsun.ch6=edit.ch6;
    highsun.ch7=edit.ch7;
    EEPROM.write(22, highsun.ch1);
    EEPROM.write(23, highsun.ch2);
    EEPROM.write(24, highsun.ch3);
    EEPROM.write(25, highsun.ch4);
    EEPROM.write(26, highsun.ch5);
    EEPROM.write(27, highsun.ch6);
    EEPROM.write(28, highsun.ch7);
  }
  
  analogWrite(led1, 0);
  analogWrite(led2, 0);
  analogWrite(led3, 0);
  analogWrite(led4, 0);
  analogWrite(led5, 0);
  analogWrite(led6, 0);
  analogWrite(led7, 0);
  delay(250);
  analogWrite(led2, 200);
  delay(250);
  analogWrite(led2, 0);
  delay(250);
  analogWrite(led2, 200);
  delay(250);
  analogWrite(led2, 0);
  delay(250);
 
  analogWrite(led1, edit.ch1);
  analogWrite(led2, edit.ch2);
  analogWrite(led3, edit.ch3);
  analogWrite(led4, edit.ch4);
  analogWrite(led5, edit.ch5);
  analogWrite(led6, edit.ch6);
  analogWrite(led7, edit.ch7);
  
  savechangesbut=0;
  Blynk.virtualWrite(V9, savechangesbut);
  

  //synclights();
}

void showeditleds()
{
  analogWrite(led1, edit.ch1);
  analogWrite(led2, edit.ch2);
  analogWrite(led3, edit.ch3);
  analogWrite(led4, edit.ch4);
  analogWrite(led5, edit.ch5);
  analogWrite(led6, edit.ch6);
  analogWrite(led7, edit.ch7);
}

void resetlights()
{
  Blynk.virtualWrite(V1, 1);
  Blynk.virtualWrite(V2, 0);
  Blynk.virtualWrite(V3, 0);
  Blynk.virtualWrite(V4, 0);
  Blynk.virtualWrite(V5, 0);
  Blynk.virtualWrite(V6, 0);
  Blynk.virtualWrite(V7, 0);
  Blynk.virtualWrite(V8, 0);
  lightedit=0;
  
  resetchangesbut=0;
  Blynk.virtualWrite(V10, resetchangesbut);
}

/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////                                             ///////////////////////
/////////////////////           V  O  I  D    L  O  O  P          ///////////////////////
/////////////////////                                             ///////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////

void loop()
{
  Blynk.run();
  
  /*
  if (millis() - tempMillis > 5000)
  {
    sensors.requestTemperatures();  
    
    tempC01 = sensors.getTempC(Probe01);      // Tank 
    tempC02 = sensors.getTempC(Probe02);      // Sump
    tempC03 = sensors.getTempC(Probe03);      // LEDS
    printtemp1();
    printtemp2();
    printtemp3();
    tempMillis = millis();
  }
  */
}

I also have a large (10% program space) testbed project running on a MEGA via a USB link. It will also tend to “stall” at random times. Sometimes I need to stop and restart the blynk-ser.bat file (which reboots the MEGA), but usually I just start pressing buttons on the app and eventually (in a few seconds) it just stutters awake and catches up as if nothing is wrong.

I personally think it has something to do with the USB link, as occasionally I see only one-way communication. E.g. Uptime counter and Hardware → App displays are working, but App → Hardware commands are not responding… until again like above, a few seconds of button/slider poking and everything just starts working as if nothing was wrong.

I use another TTL-USB adapter on the MEGA’s Serial1 to allow debugging on a serial terminal monitor; Blynk’s Debug at times, but usually just #define BLYNK_PRINT Serial1 and my own print markers to indicate function activities.

Sometimes I see flooding warnings on some heavy action functions, but usually not. I have Local Server and have fiddled with various adjustments, but none of them have seemed to affect the issue one way or another.

Try something like that debugging for your own sketch.

That is an option you can try to program in, via a combo of Blynk’s connection management and sync commands.

Right I’m getting fed up with this crap. I have spent months writing code around this Blynk app and paid out for bluetooth modules of which don’t connect to the app properly. Ive NOW paid for the full package of credits to buy widgets and re-written the code for USB connection and now that don’t work either because it keeps stalling. Can you please tell me if there actually is a way to connect this app to an Arduino that actually works because I am struggling to find one!

I have just spent another WHOLE day re writing code and testing to try and get this thing to not stall and it does it at random times for no apparent reason. Its not good enough!!!

WHY BLYNK CREATORS? WHY?

Please calm down.
Why do you use USB in nowadays? Couldn’t you just buy a wi-fi, 3g, ethernet shield and save own time? It will cost you few bucks. USB support was introduced just for the simple demos, so users can quickly check how Blynk works. And it was done many years ago when Wi-Fi MCUs were expensive. Are you really going to use USB in your real project?

Woops, sorry if I gave the impression that USB was useless… I said I “suspect” but it could be simply my own setup as well, as I am running many USB connections (2-Blynkified Arduinos and 1-TTL are running 24/7) plus the usual Mouse/KB/UPS/Cam etc.

That said, aside from the occasional “stall” Blynk is working fine. However you do have some heavier bulk BlynkWrite() processes running, so as @Dmitriy mentioned, alternate network type connections might be better suited, and perhaps you might want to consider a Local Server… A) less lag may help and B) less “expense” as you control your energy allotment (not that I found Blynk “expensive”… I have seen daily coffee expenditure in some people that could run my Blynk activity for a month ;))

Hi Dimitry. I apologise but it is so frustrating I have rebuilt my project twice now because I was told to use Bluetooth in the beginning which won’t work properly, then tried USB and that isn’t working either. From what I have seen the wifi boards aren’t cheap, certainly not a few bucks. I was told the bluetooth and BLE would work and it does’t.

What do you recommend as the best and most reliable to way to connect?

It weren’t what you said mate, I just stripped everything out and it was still stalling. Nothing else is connected to it, just the arduino and its still doing it. What is annoying is that I have paid out for two different types of bluetooth modules and they don’t even work. I’m loosing weeks and months of time trying to get this thing working and getting absolutely nowhere.

What is this local servers and how does it work? The arduino will be plugged into a laptop 24/7 so can int be run from that?

“Local” Server is offered by Blynk for install on any hardware that can run Java - so yes, your Laptop could become a Local Server for your USB tethered Mega, a bit of overkill on the hardware side, but usable :wink:

https://github.com/blynkkk/blynk-server

Be aware that it can be a possible challenge of it’s own in the install, setup and migration from the Cloud Server to it (they are totally separate, so new login, project transfers and auth codes will be required), but I think you can handle it :smiley:

You need to choose hardware based on your needs and not what other people say :wink:.

In general, it works well. But, USB requires intermediate part - the socat utility. This utility establish SSL connection between your hardware serial port and Blynk server ssl port. The socat is not our software, this is open-source that we use because it is already there. And it may stop working in case connection was dropped. Sometimes socat may not detect connection drop and we can do nothing here as this is not our software. We made a script that tries to reconnect periodically, but it also may fail.

And all this applied only for connection between your hardware and blynk server. Ther other part is your code. And here very hard to give you an answer what’s is wrong. As hardware has bugs, software for your hardware has bugs, your code probably has bugs. So it is really not that simple. We try to help when we have time. However, everyone here has other things to do.

https://www.ebay.com/p/NodeMCU-Lua-WiFi-Internet-Things-Development-Board-Based-Esp8266-Cp2102-Module/1250202765

What do you recommend as the best and most reliable to way to connect?

For MEGA the easiest way would be ethernet shield (china clone costs ~3-5$, I have such on my MEGA). However, ethernet from my point of view is outdated. As all IoT now is mostly Wi-Fi or 3G.

1 Like

Oh, thanks for that info :+1: Socat… Something more for me to look at and get confused by :stuck_out_tongue:

@Gunner don’t do that if you want to sleep well :slight_smile:.

1 Like

Yeah I just looked into this… looks a bit intense. Think I’ll give that a miss.

Ok so I will buy one of those and hopefully this will work. Third time lucky.

1 Like

Dmitriy, I have just bought an Ethernet shield for my Arduino as you instructed to use either Ethernet or Wifi as more stable that USB.

Guess what, it keeps disconnecting, connecting, disconnecting, connecting even on the most simple of sketches. Things work when its connected, but why does it keep disconnecting and then reconnecting? I thought this was supposed to be more stable?

Here is a video of what its doing…

@stevelondon post the simple sketch that keeps disconnecting together with the Serial Monitor data.

Sounds like you have a general internet or hardware problem as every connection type you try is unstable and that is not the experience of most Blynkers.

Which Ethernet shield are you using as some are very unreliable i.e. faulty?

1 Like