Robot with Esp8266 Shield and Arduino Nano

It probably has to do with fact that software processing takes up too much CPU cycles. The platform is very limited with resources, that would be it’s strength and it’s weakness :smile:

@Lichtsignaal I can see where Soft is required when using USB but not for ESP as ESP provides the required gateway. I tested hard and soft this morning as soft is the recommended use with ESP and Uno / Nanos and like @flopes found at Using ESP8266 with BLYNK soft doesn’t work at all. It gives constant login timeouts and I don’t really see the point of soft when using an ESP.

I did notice with hard you can’t use #define BLYNK_DEBUG though.

That would be somewhat of an issue, but adding some debug code for yourself is probably not that hard and sufficient.

I have some experience with serial protocol and medical devices and basically, it the hardware is not 100% OK, it doesn’t work properly. Software emulation is probably worse (I’ve tried with Wifi to serial bridges to allow remote code uploading to a Mega, but that doesn’t work at all).

My advice with serial protocol is always to use some piece of hardware of possible and stay away from software, recommended or not.

@Lichtsignaal and @psoro I think you are both local servers guys but I wondered want your thoughts were on the baud settings with ESP and the cloud?

Having started with USB I think I originally went for 115200 for the ESP and notice the recommendation is just 9600. I actually set the firmware on a couple of my ESP’s at 9600 baud to see if it might help with the cloud server disconnects.

I notice down at 9600 I am getting a lot of Buffer overflow messages when writing to the virtual LCD. Sometimes the buffer overflows will cause the server to drop the connection but sometimes it manages to ride through the problem. Is there some happy medium between 9600 and 105200 or is 9600 the best choice?

I think you should try different baudrates (baudrage in the end I think, lol). You can slowly turn it up ti faster speeds until it works good. That is probably the only method to get a decent performance. It depends on so many factors.

But your are correct in my local server(s). It’s actually two already and you could be running multiple instances on one box. Anyway, I don’t do ESP as shields, for now, but only run them standalone, so that could also be a factor. You need to remind yourself that is a very cheap piece of hardware and the performance is, I think, mostly depended on our coding skills and engineering skills.

I always used hard serial from my Nano to the ESP. I had read they are more stable and softserial and allow higher baud rates.

To debug, I had to buy a FTDI (like this: http://www.robotshop.com/ca/en/ft232rl-usb-serial-adapter.html ) that I connect to some pins on my nano, and enable softserial on that. It’s a bit annoying cause you gotta upload code to the Nano via USB, but when you are ready to debug, disconnect and reconnect to the FTDI.

I’m using 115200 for both my computer-> softserial and Nano -> ESP hard serial with no troubles.

I always use 9600… I’ll try with other baudrates and come back to you.

-Edit-

At 19200 the ESP works OK
At 38400… No luck

@cyberbum I have 20 or so FTDI’s with 5V and 3.3V but not the ‘posh’ ones you linked to so I know what you mean about connecting and disconnecting between uploads and debugging :grinning:

Are you using the cloud or a local server?

When I have used debug with USB I haven’t actually seen any more useful information than you get with BLYNK_PRINT Serial. Am I right in thinking debug is only useful with a local server?

Blynk/ESP performance for standalone is MUCH better than hardshield. I imagine there’s just a lot more going on for shield. I’ve found that 9600 is working just about great and am currently testing 19200 atm. More than that, and my hardshield performance just sucks.

@zeeko in time I’ll probably move to standalone (maybe Wemos D1 Mini’s) but I currently have dozens of Arduinos that I want to make use of. I also have dozens of RF modules and for a decent range they need 5V.

Perhaps it would be better in another thread or even the ESP forum but I do wonder how the ESP’s perform doing ‘Arduino’ tasks i.e. are all the regular libraries available etc. Also with the 4MB ESP’s how much memory is available when you have loaded up a basic Blynk sketch. I guess it can’t be less than the Nano’s that only start with 32K and 2K.

I just bought a couple D1 Mini’s on Ali express last night :smile: 4$ and free shipping! They’re the size of a quarter!

I ordered one a couple of days ago but mine is Europe to Europe rather than China to Europe so hopefully should arrive in a few days.

Hi Everyone,

Thanks much for your support

I am using Arduino Mega and linksprite cc3000 wifi. I tried the cc3000 example from Boards and Shields under Blynk ready made examples, and it worked just fine (tried to the button widget to turn a lamp on). Upon removing the USB cable, it works no more. Is there a way to run it untethered?

What Am I missing?

Thanks,

Hazem

@hkhalaf how are you planning to power the Mega and CC3000?

This is a texas instrument cc3000 shield that gets plugged on the arduino mega, so it is getting power from arduino. And arduino in turn, gets its power from a 9v battery.

Don’t worry about the power source. I already handled this. What I care about most is how to run arduino with cc3000 shield using blynk but completely untethered to the pc

@hkhalaf upload your sketch that doesn’t work and ensure it is formatted (with the </> icon).

Hi Costas,

Thanks for your support,

The problem is solved, it was a wiring problem as I am trying to operate a relay. I googled its wiring and figured out that I had a wiring mistake.

Anyway, for sake of public interest, Here is the code I used:

    /**************************************************************
 * Blynk is a platform with iOS and Android apps to control
 * Arduino, Raspberry Pi and the likes over the Internet.
 * You can easily build graphic interfaces for all your
 * projects by simply dragging and dropping widgets.
 *
 *   Downloads, docs, tutorials: http://www.blynk.cc
 *   Blynk community:            http://community.blynk.cc
 *   Social networks:            http://www.fb.com/blynkapp
 *                               http://twitter.com/blynk_app
 *
 * Blynk library is licensed under MIT license
 * This example code is in public domain.
 *
 **************************************************************
 * This example shows how to use Adafruit CC3000 breakout
 * to connect your project to Blynk.
 * Feel free to apply it to any other example. It's simple!
 *
 * For this example you need Adafruit_CC3000_Library library:
 *   https://github.com/adafruit/Adafruit_CC3000_Library
 *
 * Note: Firmware version 1.14 or later is preferred.
 *
 * 1. Update pin definitions according to your setup.
 * 2. Change WiFi ssid, pass, and Blynk auth token
 * 3. Run :)
 *
 **************************************************************/

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space

// These are the interrupt and control pins for СС3000
#define ADAFRUIT_CC3000_IRQ   3
#define ADAFRUIT_CC3000_VBAT  5
#define ADAFRUIT_CC3000_CS    10

#include <SPI.h>
#include <Adafruit_CC3000.h>
#include <BlynkSimpleCC3000.h>

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

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, "ssid", "pass", WLAN_SEC_WPA2);
}

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

Great project man. Did you updated the ESP8266 firmware to this project? Thanks

Hi @anlpereira,
Glad you like it!
From the beginning I’m using AI-v0.9.5.0 AT Firmware and everything works fine

Regards,

Thank you @psoro . I was able to update it using this tutorial http://www.allaboutcircuits.com/projects/update-the-firmware-in-your-esp8266-wi-fi-module/