[SOLVED] Virtual Pin and SIM800

Dear Blynk team,
till now I have realized many projects thanks to Blynk platform. All projects have been realized around a plain ATmega 328 with Arduino Uno boot-loader that exchange data with a Wi-Fi router through an ESP 8266 connected to the hardware serial. Data are then routed to smartphone via a local server installed on a cloud computer.
Everything works well but I need two suggestions to further improve my projects:

  1. can I enable (in any way) more than 32 virtual pins even if I use an Arduino Uno like processor? I don’t need “real” pin only virtual.
  2. I read that the SIM800 GPSR module will be supported soon. Could I have an idea about the date?

Thanks for your support and best regards,
Giancarlo

Which ESP’s are you using as there are sub $3 versions that will run 128 virtual pins?

Sure. You can either use hardware that is already supports many pins or select “Generic board” in Blynk app. (I didn’t check, but I think it should work).

Hi Costas,
I use this module: http://www.aliexpress.com/item/Upgraded-version-ESP-01-ESP8266-serial-WIFI-wireless-module-wireless-transceiver/32643936308.html

I use it not in stand alone way but as shield for the Arduino Uno (actually for the ATmega processor).

Thank you Dmitriy, I’ll try and I’ll let you know!
What about the support for the SIM800 ?

Only @vshymanskyy knows that :slight_smile:

We will provide only HTTP interface examples for SIM800. I don’t think we will provide full library API soon…
(this is because most GPRS applications will be low power with periodic reporting)

@vshymanskyy: thank you indeed (actually I hope in a full API library :slight_smile: !!)

@Dmitriy: I tried with Generic Board. Actually the App (I use the IOS version) allows me to set up to 128 virtual pins BUT when I compile a sketch I receive this error for any pin greater than V31: “V32 (or V33 or V34, …) was not declared in this scope”. For pins number < 32 it’s all OK.

Could you, please, suggest me how to work around. I confirm that I use an ATmega 328 “stand alone” with Arduino Uno boot-loader and I need a lot more than 31 pin.

Many Thanks,
Giancarlo

You need to take latest blynk library directly from github master.

@Dmitriy Just now I’ve installed blynk-library-master but the issue is always the same !!

If I select Arduino Mega in Arduino IDE (Tool > Board > Arduino Mega) the compile error disappears. But I use an ATmega328 …

This is correct. ATmega328 - only 32 pins. if you run blynk on ESP8266 directly (Standalone mode), it can handle 128! Or you can force 128 pins on any platform - at your own risk :wink:
See Blynk/BlynkConfig.h

Hi vhymanskyy, thanks a lot !!
I’ve installed the v0.3.8 but, mainly, I’ve uncommented - at my own risk :slight_smile: - the proper line in BlynkConfig.h and the compile error is disappeared.
Could you, please, explain me why it should be a risk to use a high number of virtual pins ? They are virtual !!
Thank you again for your support and best regards,
Giancarlo

I think it’s just a memory issue as most ESP’s have 1 meg of program memory compared with just 256Kb for a ‘top of the range’ Arduino. If you have enough memory for 128 pins, and the other things you want to do, you should be fine.

Yes Costas, I think so. Of course I have to be aware that the memory is limited.

In your first answer you suggested me to use an ESP8266 stand alone but the problem is that I’ve to deal with a lot of hardware modules: an RF module that exchange data with many peripheral units, an SD Card and an RTC to save data and time stamp if the internet connection should fail, an BME280 to acquire environmental data and a simple sensor to measure the battery voltage. I think that it’s very hard to manage all this stuff with a stand alone ESP8266. What do u think about?

Can I ask you a suggestion? My last project is a monitoring system installed in a remote and unmanned area without electricity. So I have to power the units with battery and solar panel. So, as you can imagine, the current consumption is a strong issue and I had to implement a power saving policy. The central unit, equipped with an ATmega 328 and the ESP connected on the hardware serial, dialogs with a TP-Link 3G mobile router equipped with a SIM Card. Question: do u know if is there on the market a 3G module with a SIM Card (supported bu Blynk) that can be connected directly on the hardware serial of the MCU in order to eliminate the double hardware of ESP and external router?
Thank you in advance for your time and support,
Giancarlo
P.S.: please, say hello to Cyprus for me !!

@Gianca I’m assuming, rightly or wrongly, that your system without electricity is different to the one with the BME280.

I am not a fan of Blynk’s solution of Arduino with ESP as WiFi shield. There are lots of users that have had problems setting it up so I prefer ESP standalone or ESP standalone but with a serial connection to an Arduino.

It depends just how many peripherals you need to connect.

ESP’s can measure battery voltage without any sensors as it is contained in the SDK.
RTC’s are not really needed as the ESP will keep time once it has connected to the Blynk server even if it drops the connection.
SD cards are not required as you can upload your data directly to a server.

So if you use the correct code then ESP’s alone can cope with most projects and a serial connection to an Arduino can be used for more complex projects.

I have a dozen TP-Link 3G mobile routers with sim cards but I don’t know of any 3G devices that you can hook up to a MCU.

Thank you Costas for your suggestions, I will explore these roads too !

Ciao,
Giancarlo

@Gianca I believe the Particle Electron has 3G https://store.particle.io/collections/electron and some Blynkers are using it [SOLVED] Particle Electron support

Hi Costas,
thank you indeed for your info.
Giancarlo