Arduino uno with Nodemcu(as wifi shield)

Hello !
I am trying to connect the UNO with nodemcu via software serial. When i open the serial monitor of the Nodemcu all am getting is this …
AT+CIPSTART=1,“TCP”,“192,1xx,1,1xx”,8080

I tried the Combinations of AT firmware and Blynk Lib. I tried from Blynk 0.3.3, 0.4.8, 0.5.8 and random versions in between.

“( While it seems to work with all of these versions, we observed that the AT version 1.1.0.0 works best.)”

this was given in the Blynk’s page so flashed the nodemcu with the exact same firmware and tested with the AT command AT+GMR and it returned

AT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)
Ai-Thinker Technology Co. Ltd.
Jun 13 2016 11:29:20
OK

When i remove the Tx and Rx pin and reboot the nodemcu and open the serial monitor i automatically get

ready
WIFI CONNECTED
WIFI GOT IP

And on UNO’s Serial monitor i am not getting any output [I dont really remember in which version(as i tried many version) the BIG Blynk logo and version came on the serial monitor. but did not connect to the server.] serial print and debug is present in the program but its not giving any output. Even the nodemcu is set to proper baud rate with
AT+UART_DEF=9600,8,1,0,0
as well as
AT+CIOBAUD=9600
and it returned
Ok

I have another nodemcu running on local server and its connected.
now i need this new Uno + Nodemcu to connect to the same server.
i have used
Blynk.begin(auth, wifi, "xxx", "xxxx", "192,1xx,1,1xx", 8080);
Is this the way ?

And the power is fed by an power full power supply. So no power problem…
the connection of serial communication is
UNO Pin 2 >Nodemcu RX
UNO PIn 3 > Nodemcu Tx
Gnd is Common between both device.

Right now USED

AT Firmware
AT version:1.1.0.0(May 11 2016 18:09:56) [Blynk suggested]
SDK version:1.5.4(baaeaebb)

(and also other latest few, and too old as well)

Arduino IDE
1.8.5
also tried with
1.8.3
1.8.2
1.6.4

Blynk Lib version
0.4.8 [tried 0.3.3, 0.5.8]

Tried with 5 different Nodemcu
and also purchased a new nodemcu and just Run the AT command and get the version and confirmed it worked and connected to Uno. No other sketch was uploaded.

I also tried some sketches found on the Community which worked out for other users with the same setup (but not nodemcu may be) just changed the ssid and pass and ip address.

Is there any mistake am doing in the process ? Read all the Threads on the Blynk community but did not find suitable solution for my problem.
Or is it not able to use the Nodemcu itself ? Only ESP-01 should be used ??

I surfed the community and google now every link appears to be Blue saying its already Read.
I am not understanding where am going wrong …
Can some one point me out in the right direction !!!

You got it in one line. No need for all the rest. :wink:

Use the NodeMCU as the standalone board it is designed to be.

A NodeMCU is an ESP01 on steroids so yes you can use it as a WiFi shield for an Arduino. For most people that’s a terrible connection method and should be avoided at all cost, but possible nonetheless.

Like peddling a motorbike… possible with effort, but why oh why :smile:

No no i mean to say will the nodemcu work with the setup am trying to achieve. Or is it not possible?

Can you please tell me where am going wrong ?
If thats a terrible connection and when its not stable enough why is this option of using it as a shield ?
Because when many are having problems with it , its better to remove this feature. Because one will keep on trying to get something out of it and it never comes into action… its like performing a brain :brain: surgery on a dead man and trying to get him back to life…

Its like old school motorcycle where we had an pedel with 50cc motor on it . So when it had no torque left one used to pedal along with the engine to give it a helping hand. In this case an uno.

I guess you have read my problem and can you suggest me something that will make it work.

I am saying, that while it MIGHT be possible to strip down a NodeMCU to simple Serial to WiFi transceiver mode (as if using an ESP-01) it is probably NOT as easy, since it was never designed for such, nor is it efficient, as that is just a waste of its capabilities. NO I don’t know how to do it, nor am I interested in learning how… it (the NodeMCU) is NOT a moped, but a much more capable motorbike :stuck_out_tongue:

IF you need to use both Arduino and NodeMCU linked together, then use the NodeMCU as a standalone WiFi capable Blynk device and link it with the Arduino (running NON blynk code) via Serial or i2C connection. I have done similar simple experiments here…

@Madhukesh please post the Uno sketch you are using. Remove tokens and pwd etc. Ensure sketch is formatted with backticks ``` on the line above and below the start and end of the sketch.

I don’t see any obvious mistakes.

Because some people like pedalling their motorbike.

Quite the opposite in fact… I find using the ESP-01 as a shield is every bit as stable, and a cheap way to add WiFi to an Arduino MEGA for the I/O win, or existing UNO projects that are already wired and working with 5v sensors, etc. (Like adding a motorized kit to a bicycle :stuck_out_tongue_winking_eye: )

But I wouldn’t ever try to do the same “Use as shield” thing with a NodeMCU or Wemos, as they are already full dev boards.

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#define ESP8266_BAUD 9600
#include <ESP8266_SoftSer.h>
//#include <BlynkSimpleShieldEsp8266_SoftSer.h>  // Changed this after surfing throught the community and tried this out.
#include <BlynkSimpleShieldEsp8266.h>
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX
ESP8266 wifi(EspSerial);


char auth[] = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
char ssid[] = "xxxxx";
char pass[] = "xxxxx";


void setup()
{
  Serial.begin(9600);
  delay(10);
  EspSerial.begin(9600);
  delay(10);

  Blynk.begin(auth, wifi, "xxxx", "xxxxxxxxxxxxx", "1xx,1xx,1,1xx", 8080); // I tried this because i need to connect to my local server
  //Blynk.begin(auth, wifi, "xxxx", "xxxx");
  Blynk.connect();
  delay(10);
  }

void loop()
{
  Blynk.run();
  }

Here is the basic code that am trying .

:tired_face: I am trying to get this working from past 2 weeks.

Hehehe no offence. A small contribution to the environment by saving a bit of fuel.:wink::stuck_out_tongue:

I just want to know… If this is not stable and in future if any company approaches Blynk with a setup like mine you cannot say [Because some people like pedalling their motorbike.]
Because they are bring some business right ? This should not be a concern for me though but just felt to ask. If something isn’t right then should not me shown in the website or provide example sketches in the sketch builder. What this will do is provoke people like me who llike to pedal motor cycle :stuck_out_tongue_closed_eyes: and try this stuff and eventually will never work as this is not a proven thing to be carried out. I followed this setup because Blynk docs had the explanation on this. And even what firmware to be used. So i thought this will work for my requirement.

Do a test to Blynk’s server.

The only issue you are having is that the ESP-01 and a NodeMCU are not quite the same thing… based on the same ESP base design, yes, but one makes a perfect transceiver and lousy dev board and the other makes a lousy transceiver and perfect dev board… that is the primary issue here.

Tried that already… No luck…

If you’re using the Arduino variable type IPAddress then the elements of the IP address need to be separated using commas rather than decimal points.

However, if (as you are) you enclose the IP address in quotes so that it’s treated a a string/char literal then decimal points need to be used instead. It should look like this:

Blynk.begin(auth, wifi, "xxxx", "xxxxxxxxxxxxx", "1xx.1xx.1.1xx", 8080); // I tried this because i need to connect to my local server

Pete.

1 Like

That’s why it’s always easier to connect to Blynk’s server to get up and running.

Connect to Blynk’s server before you waste any more time.

After that you know all is fine and can think about your own server.

1 Like

Yes,
I was initially trying to connect it to my local server because i had a nodemcu already running under same server. And it was running fine.
And this time as this did not work i tried this with blynk cloud server, but it did not connect.

It’s not that it isn’t stable, it’s just that there are much easier ways to get started.
Blynk does add a warning too.

Blynk provides an IOT solution, Arduino is not IOT hardware but Blynk goes out of their way to cater for even sadomasochists (shield users).

As already stated NodeMCU is an IOT device and best used without an Arduino. That said, I would rather use a development board like a WeMos or NodeMCU as a shield rather than an nasty ESP01.