Arduino uno with Nodemcu(as wifi shield)

What working code??.. I said I have NOT found a case of the NodeMCU being used like this.

But for sake of trying, just use the normal “As shield” Blynk Blink code.

1 Like

OMG even Valentines day is nearby. And i have given a better way of communicating :laughing::laughing::laughing:

1 Like

The one you just uploaded for testing. Ok i will find the example sketch. Thank you.

That wasn’t testing, that is my pre-existing Blynk Testbench code… and is very big. Not to mention wired differently than on an UNO as the Mega doesn’t need to use SoftSerial.

Hmm… but I thought I already gave you a link to using an UNO and ESP-01 in a RC car (above somewhere)… you would use the same setup for your case.

EDIT - Well, same topic, but different post… and NO it is wired totally differently due to only having spare analog pins availed for the shield. Not going to open that can-o-worms on you :wink:

1 Like

Thank you. I will try that now. On the JOB already.

See my edit above… stick with Blynk Blink

#define BLYNK_PRINT Serial

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

char auth[] = "YourAuthToken";
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

// Software Serial on Uno
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600

ESP8266 wifi(&EspSerial);

void setup() {
  Serial.begin(9600);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass, "blynk-cloud.com", 8080);
}

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

Now,
Downloaded Arduino IDE 1.8.7
Blynk 0.6.0

And using this sketch from the exapmle

#define BLYNK_PRINT Serial


#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

// Hardware Serial on Mega, Leonardo, Micro...
//#define EspSerial Serial1

// or Software Serial on Uno, Nano...
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

void setup()
{
  // Debug console
  Serial.begin(9600);

  delay(10);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass);
}

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

Now i will swap the pins

Now the Uno D2 goes to Tx and D3 goes to Rx .

Should i also update the AT firmware or it doesnt matter ?

Doesn’t matter but you need to be sure the baud is persistent. Some AT commands are session only and will return to the default on reboot.

Any way to make sure that the baud rate is set to what ? used this command to set the baud rate. -
AT+UART_DEF=9600,8,1,0,0
AT+CIOBAUD=9600

And here i see the baud rate as 115200 in the example code. Should i change to 9600 or let it be as it is ?

Use @Gunner’s Blynk Blink sketch and set the NodeMCI’s baud rate to 9600…

Software serial can’t handle anything faster.

Pete.

1 Like

@Costas @Gunner @PeteKnight
I am not sure what had went wrong.
Was it the Blynk lib version !
Was it the AT firmware or the Tx and Rx pin !!

I feel it was the AT firmware and the Tx and Rx pin. And also installed the new IDE
i Dont know what was wrong !! Now i am finally able to login to my local server and the project is online. !!!
I am not able to now figure out what was wrong ! Because of my curiosity i had swap the Tx n Rx pins previously !! But that had not made any changes as such !
But FINALLY it online NOW !!!
used [just for ref.]

  1. Arduino IDE 1.8.7
  2. AT version:1.1.0.0(May 11 2016 18:09:56)
    SDK version:1.5.4(baaeaebb)
  3. Blynk Lib v0.6.0

Thank you each and everyone for the support
If any glitches or any problems i face i will just leave a message here. May be it will be help full for people like me who pedal their Motor cycle … :laughing::stuck_out_tongue::wink:

3 Likes

Never doubted it.

There are 50 steps required for shield connection. Get one wrong and it fails. This is why I don’t recommend it to anyone, even my enemies.

You had more than 40 steps completed, just needed that final push.

1 Like

without you guys helping me out !! It would have never come online due to my mistakes or unidentified mistake to be precise !

1 Like

Well I did… :stuck_out_tongue_winking_eye: Until I realised about the RX TX pins…

But what a waste of existence for the poor NodeMCU :disappointed_relieved:

image

@Madhukesh But at least you can use it now :smile:

PS I guess I should also commend you on your persistence in the face of adversity… I too tend to do strange things that others don’t wish upon me :wink:

But I honestly didn’t think this would work :blush: Glad you proved me wrong! :smiley:

2 Likes

You are just Awesome !!

But i had that checked !!

But nevertheless everything worked in the final…
My

I guess you guys got this dead man alive :sweat_smile::stuck_out_tongue::stuck_out_tongue:

I had no idea this would work !! No one had ever tried this before !! But i wanted this to be tested and brought into life… By all you guys help and support. We got this working.
And the Credit goes to each and everyone of you.
And no one is wrong here its just thier perspective of viewing things :sweat_smile::wink:

These development boards are stable, out of the box, unlike an ESP-01. So as long as you go through the 50 steps it will work.

I prefer the 3 step, standalone mode though.

But all the other 49 steps needed to be completed correctly for it to work.

Actually I commend you for using a decent ESP rather than all the people that waste time with ESP-01’s. At $3 a pop the dev boards are best for 99% of IOT projects, even as a lowly shield to a pre- war Arduino.

1 Like

Hehe, sorry… you will never convince me of whatever darkside impressions you ran into :skull_and_crossbones: Perhaps I was just blessed with a smooth learning curve? Or newer devices :thinking:

I have been running two 1Mb ones, one as shield the other with Blynk sketch… both almost 24/7/365 without any issue. And another running on my RC car, as shield, whenever I get around to using it.

Yes, my first one was a bit tricky to understand… as it was my first ESP ever!! But I think it took me less then a couple of hours? Mostly Googling. Nowhere near 50 shades of… er… 50 steps :wink:

And for some reason, a NodeMCU tends to cost me almost twice that of an ESP-01… Our lovely Canuckistanian economy I guess.

:rofl: