Numbering of ports confusion

I have just joined and have tried to do a simple example which doesn’t work.
I am using an ESP8266-01 with connections GP100 and GP102 and the corresponding Blynk connections are GP0 to GP16. What corresponds to what between the two?
I notice that on the Blynk screen there is PWM after every pin except for GP2 which says Busy and GP16 which has nothing - I’m confused!

Can someone de-confuse me regarding these connections - thanks.

Just to clarify, it is G P I O

golf papa india oscar

Meaning: general purpose input/output

Thanks Dave 1829,

I assume that the ESP8266-01 pin GPIO 0 corresponds to the BLYNK GP0 and GPIO 2 corresponds to GP2???
Also, what about the PWM (pulse width modulator?) and Busy labels?

It’s early days yet with BLYNK so I must do a bit more reading of it but it would be good if I could get a headstart on the above questions.

sorry donold - i only ever use the virtual pins.

but have used a ESP8266-01 before and yes, the pins are PWM but this is of little relevance when you are stating out.

the reason you see GP zero to GP sixteen in Blynk app is because you have selected the ESP8266 FAMILY of boards, sadly, your 01 only has 2 usable GPIO’s, in contrast, for example the ESP8266-12 has many more…

in Blynk - if you have assigned a pin to a widget - it is busy. so your app must have a button/led or something that you assigned as GPIO2?

maybe if you explain what you are doing, it is going to be easier to help you tan you trying to understand the magic of blynk (which is hard to understand, you kinda just have to accept that it works, it is SO simple, and it is MUCH easier than you ever imagined)

so post up your sketch, your ESP8266 connections and your intended outcomes, and we can work it out from there…

I used the following example

https://learn.sparkfun.com/tutorials/esp8266-thing-development-board-hookup-guide/example-sketch-blink-with-blynk

and the following code was used from it.
(However I used the ESP8266-01)

/*

  • This sketch demonstrates how to scan WiFi networks.
  • The API is almost the same as with the WiFi Shield library,
  • the most obvious difference being the different file you need to include:
  • https://learn.sparkfun.com/tutorials/esp8266-thing-development-board-hookup-guide/example-sketch-blink-with-blynk
  • So method is to create the project on the iPad Blynk app adding all the controls needed and take notice of the auth given
  • Also make sure on the iPad that the correct board is specified.
  • The WiFi is as below and ensure that this is the network chosen then goto the Blynk app
    */
    #define BLYNK_PRINT Serial // Comment this out to disable prints and save space
    #include <ESP8266WiFi.h>
    #include <BlynkSimpleEsp8266.h>
    // You should get Auth Token in the Blynk App.
    // Go to the Project Settings (nut icon).
    char auth[] = “5d6886752c6443cd91b026b50a4fe1a3”;

void setup()
{
Serial.begin(9600);
Blynk.begin(auth, “xxxxxxxxx”, “xxxxxxxxxxx”);

}

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

I selected the hardware Blynk as ESP8266 and entered the authority and ran and uploaded the above sketch successfully.

On the iPad screen I put a button there and the choice after this was to either use Digital or Virtual and so I selected Digital not knowing if this was appropriate. Then the pin choice was GP0 to GP16 and then I didn’t know which pin corresponded to GPI 02 on the ESP82664 and I have got no idea about virtual. I feel that I need to do some serious reading of Blynk info.

you should wrap your code in your post by selecting the code and pressing code tags button above the editing box: </>

maybe try the Blynk ESP8266 WiFi example?

(it is in File - Examples - Blynk - Boards_WiFi - ESP8266_Standalone)

/**************************************************************
 * 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 runs directly on ESP8266 chip.
 *
 * You need to install this for ESP8266 development:
 *   https://github.com/esp8266/Arduino
 *
 * Please be sure to select the right ESP8266 module
 * in the Tools -> Board menu!
 *
 * Change WiFi ssid, pass, and Blynk auth token to run :)
 *
 **************************************************************/

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.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");
}

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

just by running this you can see it connecting via the serial monitor.

once you have that, you can add the other features (which you have not told us about - what are you trying to do with Blynk?)

I simply wanted to make the ESP8266-01 pin GPIO 2 change state from a high/low or low/high - nothing more.

how are you going to know when it changes?

seems like a pretty pointless objective??

I have a multimeter connected to that pin. I will do far more than that but at this stage I want to get the concept right. A basic function like this is fundamental, it is a case of crawl before you can walk.

Did you find this useful: http://www.blynk.cc/getting-started/

Not really.

I managed to get the blue LED on the ESP8266-01 to turn on and off using the Blynk GP1 button but was unable to get GPIO 2 on the ESP8266-01 to do anything after trying all available buttons. GP2 and GP16 are Busy. Maybe I am doing something fundamentally wrong or its a faulty chip or ???

I wonder why 2 and 16 are busy? - so many unknowns!

what does your serial output look like?

Just thinking about it I suspect that I expected Blynk to be magical. I must go back to the .ino sketch and declare the required ESP8266-01 pin GPI 02 as an output. I’m sure that this is the fundamental thing I am doing wrong. I will inform you when this gets done.

Well in the sketch setup I entered
pinMode(2, OUTPUT);
digitalWrite(2, HIGH);

but it didn’t make any difference and I could still not get the Blynk app to cause the GPIO 2 pin to change state. I am still uncertain as to what button in my Blynk screen is the correct one to use. I suspect it is GP2 but I cannot use this as it shows “busy” all the time. Strangely, the button (GP1) I was able to turn on and off the blue LED inbuilt on the ESP8266-01 board has now changed to “busy” and I can’t even do that.

This is very frustrating as Blynk is supposed to be so easy. If ever I get some success using the Blynk app to do a simple thing like turn on and off a LED attached to GPIO 2 of the ESP8266-01 I will write a book titled “Using Blynk to control an ESP8266 for Dummies”

What should I do now to try to get this “simple” project to work and how do I stop the “busy” alongside the Blynk pins?

to help us help you,

post up:

  1. a screenshot of you app on your device (the one which shows the buttons)
  2. the exact sketch you uploaded to your MCU (in code </> tags)
  3. a schematic diagram (or picture) of your MCU wiring

otherwise we are “blind”

and 4. your serial output from the IDE, (as previously requested)

Not sure how to wrap this code and I selected it and did the </> thing and got as per below

[code]
/*
 *  This sketch demonstrates how to scan WiFi networks. 
 *  The API is almost the same as with the WiFi Shield library, 
 *  the most obvious difference being the different file you need to include:
 *  https://learn.sparkfun.com/tutorials/esp8266-thing-development-board-hookup-guide/example-sketch-blink-with-blynk
 *  So method is to create the project on the iPad Blynk app adding all the controls needed and take notice of the auth given
 *  Also make sure on the iPad that the correct board is specified.
 *  The WiFi is as below and ensure that this is the network chosen then goto the Blynk app
 */
// #define BLYNK_DEBUG
#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
//const int GPIO2 = 2;
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "5d6886752c6443cd91b026b50a4fe1a3";

void setup()
{
  Serial.begin(9600);
  pinMode(2, OUTPUT);
  digitalWrite(2, HIGH);
//  pinMode(GPIO2, OUTPUT);
  Blynk.begin(auth, "xxxxxxxxx", "xxxxxxxxxxxx");

}

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

[/code]`indent preformatted text by 4 spaces`

You can see that I have had various attempts to succeed.

You will have to trust me on my wiring - it is correct as it works on every other project not involving Blynk.

Unsure how to do a screenshot of the app showing the button as I am using a PC for code and an Ipad for Blynk. Would I take photos of the Ipad Blynk screens and somehow put them onto this reply area as jpg files??

I might give up at this stage and replace the ESP8266-01 with a 12E to see if it works.

I still don’t know whether you have to declare pins in the sketch or whether the Blynk app takes care of that - I suspect that they have to be declared. How can a Digital pin be made “non busy” in Blynk?

I hope the following screen shots worked. I emailed the photos to this computer and dragged and dropped them here.

I didn’t see anything meaningful on the serial IDE

you try the virtual pins?