PDA

View Full Version : Sharing my enthusiasm too!



ardhuru
- 21st March 2016, 08:41
After seeing the excellent projects by guys on this forum using an ESP8266, I couldn't help sharing my own modest project, as also my opinion(s) for the benefit of those intending to use the ESP8266.

The core project (host) is a pic based water level monitor and pump controlling system. What I thought would be nice to have was a way to check the readings remotely, using any browser. I do not have a static IP, and I found port forwarding on the router to be quite cumbersome, so I decided to post my data on Thingspeak, from where it could be read on any browser.

I went around in circles trying to decide the environment for writing my code for the ESP, and here are my observations (not everybody would agree with this part, I'm sure)

1) Native AT command set: too complex.

2) Lua: Great environment, but I found the learning curve a bit too steep.

3) ESP8266Basic: For anyone who has used PBP, should be very easy to use. But, I somehow could not get a stable installation.

4) Arduino IDE: I was reluctant to try out the Arduino all these years, but for the ESP I believe this is the best option currently available, with loads of support. The best part being most of the existing libraries and sketches written for the Arduino can be directly ported to the ESP.

The Thingspeak channel is at:

https://thingspeak.com/channels/98492

The updates might be suspended for some time, while I tweak the code in the host device.

Lastly, how I wish the good folks at MELABS would work on a basic for this module!

Regards,

Anand

Dave
- 21st March 2016, 12:48
Anand, You do realize that the commands sent by the Arduino are the AT commands. The bigest thing I don't like about the Arduino enviroment is the lack of documentation on the code contributors part as someone will take a piece of code, modify it and repost it without any modified comments or documentation. Then you spend hours sifting through someone elses code to figure out what they are doing.. I agree with you about the ESPBasic. It is yery unstable, Especially when modifing or editing the code you have flashed into the device.

pedja089
- 21st March 2016, 13:13
Dave,
you can actually run arduino sketches on ESP module.
Checkout this
https://hackaday.io/project/5150-arduino-ide-for-esp8266-quickstart-guide

ardhuru
- 21st March 2016, 14:24
Dave, I should have been more explicit in describing option 4; I just use the Arduino IDE, and directly program the code into an ESP8266, there's no physical Arduino involved.

As of Arduino IDE ver 1.6.5 (I think), the IDE lets you choose an ESP8266 as the target, in place of a real Arduino. All you do is re-map the gpio pins.

And as Pedja pointed out, you can use most of the existing libraries, and code sketches, directly into the ESP.

And the fact that it sells so cheap, it doesn't really make sense using an Arduino in any project, even if you don't need the wifi.

And Pedja, ESP support for Arduino IDE is now official, so you can directly download and install the latest version (1.6.8) from the Arduino site.

pedja089
- 21st March 2016, 16:13
I didn't know that. Thanks.

Heckler
- 21st March 2016, 20:53
Hi Ardhuru,

Which ESP module are you using?

I'm surprised you had problems getting ESPbasic up and running.
What was the issue?
Anything I can help you with??

I am not saying I am a wizard at the coding of stuff on it (mostly trial and error and looking at others examples) but it seemed pretty easy to get it installed and running.

Although there was a time when one of his versions was a bit unstable so I backed up to an earlier version and it cleared up the problems and I didn't need what was in the newer version.

I think I am using ESPbasic V 1.67 for my clock.

Let me know if I can help you with the ESPbasic if you want to get it working.
Or if you are happy with the direction you have gone then all is good.

The ESPbasic is actually built on the foundation of the arduino implimentation, I believe, so if you are comfortable with the C-like language of arduino then it may be more capable.

Dave
- 21st March 2016, 20:58
pedja089, This looks interesting. I think I will give it a try. It has been a while since I looked at anything having to do with the Arduino... Thanks...

richard
- 21st March 2016, 23:27
ESPBasic. It is yery unstable, Especially when modifing or editing the code you have flashed into the device.

I had the same issue and gave up on the whole idea. last week I gave it one last chance and had another go. this time I was successful.
the main issues I had :-
1. power supply not good enough
2. using ie 11 to access the esp module , changed over to Mozilla and all the problems disappeared
3. impatience (when you format the user flash space you get a done message when finished I'm not sure I always waited for it )

richard
- 22nd March 2016, 04:52
this little app shows my solar panel output for the last hour , samples at 60 sec interval

grey lines are at 16 14 12 volts [can't figure how to add text labels to graphics yet

8205


prescaled sample input from pic
g6868645855556165666665656466656464646464635650464 54645515865666666656564636358585661636364646463636 363636161616161616161

each sample is a two digit decimal scaled to suit the graph ( sample * 10) - 140 + 50

graph y range = 100 points , mid point of display is 14 volts so y range is 9 to 19 v with 0.1 v resolution

if sample = 15.8 volts then graph_sample = 158 - 140 + 50 = 68

graphic refreshes every 15 sec and the pic feeds in fresh data every new sample (60 sec)

ardhuru
- 23rd March 2016, 07:28
Which ESP module are you using?

I think I am using ESPbasic V 1.67 for my clock.

Let me know if I can help you with the ESPbasic if you want to get it working.
Or if you are happy with the direction you have gone then all is good.

I believe, so if you are comfortable with the C-like language of arduino then it may be more capable.

Hi Heckler,

I have a couple of ESP01s, ESP01s with flash upgraded to 4mb, ESP07s and a nodeMCU board in my arsenal.

I understand ESP8266Basic works best with 4 mb. My main issues were to do with the file management. Code that I saved would not show up in the file manager, or would automatically get renamed to 'default' and so on. I finally did succeed in getting it working, but didn't have the confidence the issues would not resurface. I have tried this with ver 1.65 and and 1.68.

I'm no expert in C++, so the ESP8266Basic's similarity with PBP is still very enticing; the ease with which you guys can achieve things, in a few simple lines, does make me envious.

Time to give it one more try! And be warned, I shall take up your very gracious offer for help very seriously!

Regards,

Anand

dhouston
- 19th April 2016, 22:28
Anand,

You should have followed up on ZBasic for ESP8266. It's compiler so it's better suited for the limited memory of the ESP8266-01. Most of the ~250 commands for the standard version (Atmel chips) of ZBasic are also available for the ESP8266.

For everyone, this is an outstanding reference for the ESP8266.
https://www.espressif.com/en/media_overview/news/latest-version-kolbans-book-esp8266

dhouston
- 19th May 2016, 21:29
There's a new contender. Basic4Arduino is a free package that appears to also be adding support for the ESP8266.
https://www.b4x.com/b4r.html

ardhuru
- 24th May 2016, 08:45
Anand,
You should have followed up on ZBasic for ESP8266. It's compiler so it's better suited for the limited memory of the ESP8266-01. Most of the ~250 commands for the standard version (Atmel chips) of ZBasic are also available for the ESP8266.


Dave,

These past few months have kept me occupied with other things, so much so that I have been neglecting my hobbies. So, in the gaps in-between when I can sneak some time to indulge in them, I've been reluctant to learn new platforms.

When it comes to the ESP, I've been going around in circles deciding between Lua, Arduino-ESP, and of late ESP8266Basic, which is now much more stable than it used to be. Its also perhaps the fastest to get going, with additional benefits like being completely OTA and more.

And now, just like you report, there's a new contender, B4R! Having been using B4A for some time, this is a serious option to be considered, especially since it also produces code that can be directly flashed into the ESP.

Also, keep checking up on ESP8266Basic; 'big' things are being promised in the next release, with quantum enhancements. This release is expected to be out within a week or so. In terms of usage I guess its the closest to PBP, and the parallels keep increasing, so the learning curve is very short indeed.

What is your preferred platform for the ESP?

dhouston
- 26th May 2016, 16:19
Dave,
What is your preferred platform for the ESP?

At this point it looks like Erel is planning to support it so I'm waiting to see where that goes. I have a project that involves an Arduino Mini Pro plus ESP plus HC-05 Bluetooth and it now looks like I'll be able to support all using B4R.

BTW, this book is an excellent resource for the ESP...
http://neilkolban.com/tech/esp8266/

ardhuru
- 26th May 2016, 17:22
Right, that makes sense.

If your project requires an ESP as well as Bluetooth, you might want to hold on the final design and migrate it to the expected-soon ESP32, which supports Wifi as well as BLE.

I'm wondering, why use an Arduino at all? Do you need more I/Os than what the ESP8266 12E has?

I'd stumbled across Neils book a few days back. Its absolutely amazing, isn't it? Quite an exhaustive resource.

dhouston
- 27th May 2016, 00:27
I'm wondering, why use an Arduino at all? Do you need more I/Os than what the ESP8266 12E has?

It's a DIY project and the Arduino Mini Pro is easier for end users to handle. WiFi & Bluetooth are optional and function only as wireless to serial interfaces. It's actually two projects that can share most of the code - one needs all of the pins on the Arduino. And the Arduino Mini Pro has an onboard 5V LDO allowing more flexibility in providing power.

Finally, I'm 74 and in poor health so I dislike delays.