Saturday, April 15, 2017

IFTTT - If This Then That

If you, by now, haven't heard about this service it is time that you did. IFTTT is a free service that can make all kind of things in your life much easier.

First if you think it looks like some kind of programming language. You are wrong. You do not have to have any programming knowledge to use the service. The term IFTTT has however indeed originated in the programming world. It looks like the IF.......THEN...... statements in many programming languages.

So what does it do. Well exactly as the name suggest.

IF THIS (an action you perform) THEN THAT (Initiate another action).

So what can we do with it.

Let me give you a simple example.

I make a lot of photo's with my Android Phone. In fact I use my phone more for photographing as I use my regular cam. Well that is just because it is so convenient. The phone has a good camera quality and I always carry it around. But there is one flaw. I make a lot of photo's but I always forget to upload them to my computer. So they are stuck on my camera and there is always the risk of loosing them. In a previous story I told you that I use cloud services like Copy, Dropbox and Google Drive to upload my photo's, but you need the discipline to actually do that and that is where it lacks me.
So wouldn't it be great if you could automate that.

And that is where IFTTT comes in.


Direct your browser to ifttt.com and open an account. As it is a free service there is nothing that should prevent you from doing that.

In IFTTT you can make automated actions called Recipes. So I made a recipe that works as follows:

IF (I make a photograph on my phone) THEN (upload it automatically to Google Drive).

Ok let's do that in a step by step order.




First click on the tab 'My Recipes'
And choose Create a Recipe. A new screen opens that looks like this:




 Now click on the blue 'this'


The screen changes and there is a line in which you can type what you are looking for.


As you can see I filled in that I was looking for android.
Choose Android Photo and IFTTT gives you some options.


 Choose 'any new photo'




 Now press the blue button that says 'Create trigger'

Next step is choosing what happens after the photo is taken. The IF THIS from IFTTT is IF a photo is taken. We are now going to tell IFTTT what to do: the THEN side. So click the blue 'that' and search for the Google Drive logo and click on it.








Connect to your Google Drive account by filling in the form.
Just finish the required steps (for privacy reasons I do not show them here) and you're done.

Next thing is to download the IFTTT app on your phone from the play store and activate the account on your phone and you're set to go. Each time you make a new photograph with your phone the picture will automatically upload to your Google drive account.


I made the same recipe for my dropbox account. So a picture taken is automatically written to both my Dropbox as well as Google Drive. Just for safety.

However you can make things easy by making the following recipe:

This means that any new posting in your Drop-Box account is automatically copied to your Google Drive.

There are hundreds no maybe thousands recipes to discover.


This recipe couples Blogger to twitter. So the IF is Blogger and the THAT is Twitter. This tells IFTTT to post any new web-log entry automatically to twitter.


The recipe above is just for your phone. The IF is your home location and the THAT is to turn wifi in your phone off to save battery power.

Just browse all the channels in IFTTT and use your imagination. There are hundreds of possibillities which can make life a lot easier.

And then there is one channel on IFTTT that deserves our special attention and that is the Maker Channel. Using the Maker Channel we can trigger events with an ESP-8266 for example. This gives us tremendous possibilities with the Internet of Things. I'll show you how to use that in another story.

For now. Just try it and have fun.

Luc Volders

Saturday, April 1, 2017

Cheapskate

As this is a real functioning project I still urge you to look at the day it is published. Many people took this as a serious project and that just demonstrates what a hype the IOT is.

Hey I am Dutch. I am allowed to be a cheapskate.
So what does this have to do with this tech-weblog. Well I'll tell you.

What does every family has in their house: a fridge
And what is every Dutch guy and girl afraid of: that the light in the fridge will not turn off when you close the door and keeps burning money. Bull ?? No really. I have colleges at work that admitted that they on purpose broke the light in the fridge to make sure it was out. Another college told me that he just removed the light.

Well I did not want to do that because one of our fridges is in our basement in where there is insufficient light. So I need the light in the fridge. But what if it really will not turn off when I close the door. It keeps using electricity unnecessarily and therefore keeps wasting money.

As I am a tinkerer I knew I had to come up with something. And here is my solution.



I attached an LDR (Light Dependant Resistor) to the analogue I/O of a NodeMCU. That way I could measure the amount of light and could therefore tell wether the light in the fridge was on or off.

And here is the setup. If the light in the fridge would be off it would be totally dark in the fridge and that would set the LDR to its highest resistance. Something like 10M Ohm. If the light would be on it would fully expose the LDR and it's resistance would be Minimal.
I used the Axel Benz formula and that showed me that the pull-down resistor would have to be 10K in this case.

I will delve deeper into this very usefull formula in an upcoming story.

Now that I had the working setup I wanted to make a nice looking webpage that informed me wether the light in the fridge would be on or off. I used my favorite development environment: ESP-BASIC



First in the filemanager section I uploaded two pictures of lamps one on and one off. That would be the base of my monitoring.

Then I examined which values the ESP analog port would registrate in darkness and in light. I did that by writing a simple Basic Program.



timer 100,[test]

wprint |<h1 style="text-align:center;">Luc Volders</br>Light Tester</br>|
wprint "<br/>"
textbox value
wprint "<br/><br/>"
button "<h2>Off</h2>", [Off]
wprint "<br/>"
wait

[test]
sensor =  io(ai)

value = sensor
wait

[Off]
end


Let's look at the program:

timer 100,[test]

this statement at the beginning of the program makes sure that the routine called 'test' is called every 100 miliseconds.

[test]
sensor =  io(ai)
value = sensor
wait

The routine just reads the analog port of the NodeMCU and puts that in the variable 'value'

textbox value

just puts the measured value in a textbox on the screen.

The rest is just HTML code to put the text in a fancy way on your screen and generates a button that, when pressed, ends the program.

So that is easy. Lets look at the values the program produces.







In darkness I would get a value of 13 and in full light 850.




Naturally I also get inbetween values if the LDR is in the shade. This helps enormously. The LDR is not always positionable direct under the lamp. So I need to place it at any vacant location in the fridge and it has to react to any little bit of light it can detect.




And here is the setup in real life. Well it is a testing setup just to prove the concept works. A PCB and casing will follow later on. The red arrow points to the breadboard and in front of it is a  powerbank with an enormous capacity.



The only thing I had to do is to alter the program in such a way that in darkness the picture of the lamp that is off would get on the screen and when the light in the fridge is on the picture of the lamp that is on would be put on the screen. That gives me the above webpages on my phone.


onofnew = 1000
onof=0
timer 100, [TOP]
wait

[TOP]
onof = io(ai)
if abs(onof - onofnew) > 30 then
   CLS
   wprint "<h2>Fridge light 

status</h2>"
   wprint "<br>"
     if onof < 25 then
       image "lampoff.jpg"
     else
       image "lampon.jpg"
     end if
onofnew = io(ai)
end if
wprint "<br>"
wait

And there is the full program. Not much to it.
Every tenth of a second a subroutine is called that tests wether the value of the LDR has altered with whatever small amount. Next the program tests if the value of the LDR is below 25 and that indicates that it is in full darkness.

So it works.

There are however some small problems.
First the power supply is giving me some problems. The batteries seem to loose strength in the cold of the fridge.So they do not last long.

Next is the Wifi connection. The problem is not the distance from my router as I have a good connection when the door of the fridge is open. But the connection fades away when the door is closed. Well that is obvious as the fridge's walls are made from sheet metal and that works like a faraday cage letting no signals escape. However that makes it impossible to really test wether the light is out when the door is closed.

The workaround.

Above mentioned problems are really annoying so I had to find a work around and I did. I still have to implement it but I will give you the setup:


Drill a hole in the door of the fridge and kit some perspex on it as a looking glass. That way you can easily see if the light in the fridge turns off as you close the door. However it is not as sexy as my ESP setup.

Till next time
have fun

Luc Volders

Wednesday, March 15, 2017

Micro:bit introduction


While surfing the net looking at my favorite technology sites I stumbled upon a small microcontroller board called the Micro:bit. I never really dug into that as it was not easily onbtainable in the Netherlands. And then suddenly my favorite (non-china based) reseller Kiwi-Electronics (I am not related to them in any way) was stocking them. So it drew my attention and I decided to buy one of these.

A bit of background.

In England the Micro:Bit was free of charge distributed amongst all 7th graders in schools all over the UK. It was a initiative of the BBC and some large names are involved like Microsoft, The British Council, Lancaster university etc. etc. The purpose is (like many years ago with the legendary BBC computer) to get kids coding.

Because the impact of distributing the Micro:bit for free amongst kids (1.000.000 pieces were given away) is so big there has to be a lot of assistance and there is.

There are several programming languages available amongst whom are Python, Blocks, Java, Microsofts Touch, Fuze Basic and Forth. ARM Mbed even has an on-line IDE for C/C++ development available at http://developer.mbed.org.
You can find many examples, projects and interactive programming on the official website: http://microbit.org

So what's the fuzz all about.




Well first Micro:bit has a great programming environment. At the microbit.org website just choose Let's code and you can choose from several languages which all have a web-ide. This makes programming a piece of cake. Many languages even have an onboard web-simulator so you can test your code before transferring tit (through USB) to the Micro:bit itself.

Next to that you can program it from an Android device by pairing it with it's build in Bluetooth. And naturally you can program it from my second favorite devellopment machine: the Raspberry Pi.

The hardware.

Besides having a great software backup the hardware is impressive.


The Micro:bit can use a USB connection (think powerbank) or batteries as a power source.
There are two buttons available for interaction with programs.
It has an array of 5 x 5 leds on which you can scroll texts or have simple graphics. The individual leds brightness can be controlled.

It's got 3 large I/O connections to be used as a digital input or output but also as an analog input.
And onboard there is a compass, thermometer and an accelerometer.
And last but not least the Micro:bit has build in Bluetooth LE so it can be paired with your smart-phone, tablet, Raspberry Pi or even another Micro:bit.

The first project.

So when I first laid my hands on a Micro:bit I started with scrolling some text on its array of leds. I downloaded a few examples and played a bit with it getting familiar with the programming environment.

Next step was a small project to test the analog input and the capability of controlling a servo. And that is what I am going to demonstrate here.

To test the analog input I used a flex sensor. Flex sensors are resistors who's value alter when you bend them. A variation on this are the pressure sensors who's resistance vary when you put pressure on them. Both kinds are rather expenisive. So you can substitute the flex-sensor by a regular potmeter.

However you can also make your own flex-sensors for next to nothing with some velostat. You can read how to build your own flex-sensors in an upcoming story. So stay tuned.

The hardware setup.



As you can see in the schematic above the setup is simple.
The flex sensor is connected with a pull-up resistor to pin 0 of the Micro:bit and the servo is connected to pin 1
I powered the servo and the Micro:bit seperately as I was afraid that the Micro:bit was not able to deliver sufficient power. In the end I was wrong. The Micro:bit is capable of powering the servo by itself, however that is pushing the limit of its onboard power regulator.



The picture above shows you my real-life setup.
At the bottom on the right side connected with the alligator clips is my home made flex-sensor in strecthed shape.

Reading analog

For programming I chose Microsoft PXT which is a block-based editor (like Scratch or App-Inventor) which translates the blocks into Javascript.


So the blocks shown here read the analog pin, then show the read number on the led matrix and pause 500 miliseconds before taking another reading. The Forever blocks makes thism program run infinit.


And this is the Javascript code it automatically translates into.

Adding the servo

Next step was to translate the reading of the flex sensor into a servo movement. This means that the more you bend the flex-sensor the farther the arm of the servo will turn.


The block code is really simple again.
I read the analog input and limit it on the upperside to 100 and on the lower side to 40.
The difference between the minimum of 40 and maximum of 100 gives me a range of 60 which can easily be translated into servo steps. A servo can move in 180 degrees. So each of my 60 steps represent 3 degrees of the servo.
So the program displays the angle on the led matrix and puts the servo in that position.
Done in essentially 13 lines of code.


And here is the translated Javascript code.

Fun

The Micro:bit is fun to play with. The PXT block editor is easy to use and gives results very fast. And the results can be tested by the build in emulator which makes it even easier to test your projects. I surely can see that this is a great tool to get children interested in programming and electronics. And for adults it is a fast way to learn the basics of Python and get immediate results.

Limitations and expansion


For what it is intended to do the Micro:bit is really great. However when you need to do some real world projects the 3 standard I/O ports are a bit limited and as the Micro:bit has no wifi it is really restircted in its communication.


For the adventurous amongst us there is a break-out board with headers. So attaching the Micro:bit with Dupont wires to a breadboard is possible and you will get a load of I/O ports on the way.


The picture above shows you all the available I/O ports when using the break-out board. You can find a full description of the pins on the Micro:bit website in this link https://www.microbit.co.uk/device/pins

These I/O ports will make the Micro:bit much more usable for projects. However it will then be more competing with the Arduino series of boards as there is still the lack of wifi communication.

The competitions answer.

In the educational world there is a big competitor for the Micro:bit being the Raspberry. Well the Raspberry is much more advanced as it is a complete linux machine with HDMI output to a TV screen or monitor. However the big barrier for the Raspberry for kids is its price-tag. The Raspberry Pi 3 costs about 39 euro which is a lot of money for kids. Do not get me wrong, the Raspberry foundation does a tremendous job in teaching kids programming with the Raspberry but loads of projects made with the Raspberry are real-world projects because it is a full fledged computer and a fast one to !!!



In comes the Raspberry Pi Zero. This will be a game-changer as it is a full Raspberry Pi (be it a slower version, it is a bit faster as the Pi 1) and has the incredible price-tag of 5.50 Euro. That's right a full fledged linux machine with USB and HDMI for less as 6 euro. And just released is the Pi Zero W which has on board Wifi and Blue-Tooth for just 11 Euro. Now that is amazing !!
This is a price-tag which is affordable for kids but also makes it a real competitor for Arduino and ESP projects.


Let's compare the prices of both; Remember that the Micro:bit was free distributed amongst kids in the Uk but if you want to buy one extra for your products it is at the moment that I am writing this about 14 Euro. So the Raspberry Pi Zero is about at one third of that price and even the Pi Zero W with Wifi and Bluetooth is cheaper.

There will be more stories coming up on the Micro:bit and on the amazing Raspberry Pi Zero. So watch this space.

Till then, have fun.

Luc Volders

Wednesday, March 1, 2017

Back to Basic - Basic language on the ESP8266


When I was a young guy of about 17 years old (we are talking 1976) I bought my first computer which was basically a bag of chips with a calculator keyboard and a calculator-like display. It was based on a RCA 1802 microprocessor and could only be programmed in machine language (thats even lower as assembly).



Later I moved on to the Commodore PET which was the predecessor of the Commodore 64. Just look at that beauty. At that time computers still looked like computers !! The Pet (personal Electronic Transactor) could be programmed in Basic which was a huge leap forward. I did marvels in Basic. I wrote a simulator for an assembly language that was ported to a Burroughs Mainframe and was used at the HTS in Eindhoven for study purposes. I wrote a database program (Elektronische Kaartenbak), a spreadsheet program (Volderscalc) and a complete accounting package (VOLAD) in Basic and all this on my faithfull PET with only 32K of memory.

And now in the age of Arduino and ESP-8266 I had to learn a whole bunch of new languages: C++, Lua, Python and HTML.

Basic as a language is nowadays looked upon as inferior by many programmers. The reason for this is that Basic has Goto statements. This makes it possible to jump from one part of the program to another part at any instance. To many programmers this kills structured programming and makes it possible to code like spaghetti.

So I was totally pleased when suddenly there was a Basic for the ESP-8266. And if I may say so not an ordinary Basic but a real splendid one. ESP8266-Basic has so many features build in that it is possible to read a thermometer sensor and display the values on a webpage in just 2 lines of code: amazing.

So lets do it: lets program in Basic on the famous ESP8266.

Installing ESP8266-Basic.

Before we can start programming in Basic we need to install the language on the ESP-8266 itself. Well that's a piece of cake. First download the ESP Flasher from this page:
https://www.esp8266basic.com/download.html

Put the Flasher in a sub-directory on your computer and start it.
The Flasher indicates the Com-Port on which it found the ESP8266 and you will have to tell it the amount of memory the ESP8266 has. For the ESP8266-01 choose 512K or 1M. For the NodeMCU and its varieties types use 4M.


Next choose Flash Firmware and the led on the ESP8266 will start to blink.





On screen you will see the flashing progres and after a while flashing is ready and the info on your screen will look as the picture above.

Wireles Station or stand-alone.

When Basic has been flashed into the ESP we can start using it.
At first ESP8266-Basic is not connected to your router because (off course) it does not know your routers nae and password to get access.

So ESP8266-Basic has to be connected to as an Access Point.

Start Wifi on your phone or tablet and look for the accesspoints. One will be called ESP followed by some number (which is actually the MAC adress of your ESP8266). Activate this accesspoint on your device and make sure it is connected to your phone or tablet.

For properly using ESP-8266 Basic you will need to use Firefox or Chrome as browser on your Android device.


Now start the browser and surf to 192.168.4.1 and you will see the start screen of ESP-8266 Basic.

As you can see I am using ESP8266-Basic 3.0 Alpha 51.
Now I am experiencing a small problem with this version and that is that not all menu items are directly available. So I found a way around this. Just follow the steps below and you're all safe.

First choose the menu item EDIT.

Edit starts with a program called default.bas which is not available in the ESP-8266. So we will make our first program. In the program area just type the first program line:

print "hello"

Next step is to click on Save. and that's it. You wrote your first program. Which is at the same time the workaround. All Menu items are available now.


Now if you click on Run Basic will run the program which just prints the word hello on your screen.

That's it.

The other menu functions

As you have seen there are several menu items available.

VARS
will give you a list of used variables and all the ESP pin states !!

EDIT
is used to edit programs like we just did above

RUN
will start the last Edited and saved program

DEBUG
is used to help you debug any faults in your program with a pause function, showing you which line is executed and at the same time showing a list of variables.






FILE MANAGER
is just what it suggests. You can browse your computer or Android device for files and upload them to the ESP. And you can choose in the file list the program you want to Edit, Delete or Rename. When choosing a program and choosing Edit you will be directed to the Edit screen.
The Filemanager menu was only available after I wrote and saved my default.bas program





SETTINGS
Settings is an important item. In settings you can put the name of your Access point and Password so you can access ESP8266-Basic from any device (computer, laptop or Android device) in your network. As I find my phones screen to small for daily programming I program ESP8266-Basic from my computer.
The Settings menu was only accessible after I wrote and saved my default.bas program.


Another important setting is wether ESP-Basic has to start the default.bas program directly at starting up. With this setting your program will automatically run each time the ESP is powered up.

Access from within your network.




After filling in your Accesspoints name and password in the SETTINGS page ESP-Basic will come up in your router as a new device.



Look in your router for the IP adress for the ESP and start a new window with the IP-adress as URL. So now we are ready to go.

Now why would I program the ESP from my desktop machine. Well it makes it easy to open multiple windows, search for Basic programs copy them and paste them in the ESP8266-BASIC EDIT window. Makes programming very easy.

Dallas 18b20




The Dallas 18b20 is the ideal thermometer. It has a wide range of measurement from -55 degress Celsius to +125 degrees Celsius. Its accuracy is 0.5 degrees Celsius and it is waterproof. So theoretically you can put it in aboiling kettle and measure the temperature. I have seen tinkerers putting one in a freezer to check the temperature. As it is waterproof you can use it for measuring outside temperature.

It uses a specific communiaction protocol and communicates over just 1 wire. There is a lot to tell about this wonder-thermometer but I'll save that for a rainy day.

Most important is that it easily communicates with ESP8266-Basic.

Measuring temperature with the Dallas 18b20

There is a ton on information about the Dallas 18b20 on the internet. And we do not need it at all for using it with ESP8266-Basic. You just have to remember one thing and that is that the Dallas 18b20 dataline NEEDS to be attached to D4 (GPIO2) on the NodeMCU board.


[EDIT] Oops !!! Just saw a mistake on the breadboard layout down here. I forgot to attach the 5 volt lead from the NodeMCU to the breadboard.So put a small lead from Vin (bottom right) to the VCC line.




Now that is done we need to write our Basic program. And here comes the neat part. We only need two lines of code:



So let us look at the program:

temnow = temp(0)
wprint temnow


First we read the Dallas thermometer with the command temp(0) and put it in the variable temnow
the second line puts the variable on the screen.

That's it.



The above picture is the result when we run this program.
The temperature with an accuracy of 4 decimals in just 2 lines of code.

Now this accuracy is fine but I want just 1 decimal for better readaility. Well here we go:



temnow = temp(0)
temnow = int(temnow*10)/10
wprint temnow


Save the program and run it.




The second line in our program multiplies the temnow variable with 10 and makes an integer from it. Next it is divided by 10 again and there we have our value with just 1 decimal.

A nice looking webpage

Now look at the next picture of a webpage.



It is the same temperature reading but now in a nice web-page with a background color, a header for the page info. The temperature reading in a contrasting color and a bar that indicates wether the temperature is lowering or rising. And 2 buttons of which one takes another reading and the other one stops this program.

Man, this must be complicated to program......... NOT

 memclear  
 cls  
 temnow = temp(0)  
 temnow = int(temnow * 10)  
 temnow = temnow / 10  
 wprint "<!DOCTYPE html>"   
 wprint "<html> <body>"  
 wprint |<body style="background-color:powderblue;">|  
 wprint |<H1><span style="color: red;">|  
 wprint "Thermometer"  
 wprint "</H1>"  
 wprint "</span>"  
 wprint |<H2><span style="color: blue;">|  
 wprint "Temperature = "  
 wprint temnow  
 wprint "</span>"  
 wprint "</H2>"  
 meter temnow, 0, 40  
 wprint "<br>"  
 wprint "<br>"  
 button "Again", [again]  
 wprint "............"  
 button "Stop", [quit]  
 timer 1000, [refresh]  
 wait  
 [refresh]  
 temnow = temp(0)  
 Wait  
 [again]  
 timer 0  
 run  
 wait  
 [quit]  
 end  


Just look at this source code. Most of it is HTML commands for formatting the page layout.
Putting a button on your web-page is done by the command:

button "Again", [again]

and the program just jumps to the label [again] if you press that button.

I think you can figure out the rest of the program for yourselves as it is dead-easy.

Neopixels

Remember the Neopixels. Those charming RGB leds for which you need just 1 dataline to control hundreds of them. Well programming them in ESP8266-Basic is a piece of cake.

But before you start using the Neopixels with ESP8266-Basic I urge you to read the story I wrote about the neopixels. You can switch to that story in a new tab by clicking here.
http://lucstechblog.blogspot.nl/2015/10/neopixels-ws2812-intro.html

 



First set up your breadboard like the above picture and connect the Neopixel data line to the NodeMCU D8 line. ESP8266-Basic uses this pin as its default pin for accessing the neopixels. You can alter this with the neo.setup() command. If you want to connect the neopixels to D7 for example you start the ptogram with the next line:

neo.setup(d7)

In the example below I used 7 Neopixels.

Now type in the editor the next program and save it:




neo.cls()

for x=0 to 6
neo(x,0,0,255,0)
delay 1000
next x

The Neopixel command neo() uses the following syntax:
the first parameter (x in this case) is the number of the neopixel in the chain starting at 0
The next 3 figures (0,0,255) represent the RGB code which is in this case blue
The last figure 0 in this case tells Basic to immediately change the color.

At first the Neopixels will be off. Then one by one they will light up in blue until they all display blue and the program stops.

Anybody who is familiar with programming will appreciate how easy it is to do amazing things with ESP-Basic.

IFTTT

A lot of automation can be done with IFTTT (If This Then That). IFTTT is much used by ESP-8266 enthousiasts as it easily can be used to trigger all kinds of events for IOT (Internet of Things) projects. One of the upcoming stories is how to use IFTTT to send a Twitter message if it rains using my rain-detector described in the story you can read by clicking here.

Adressing IFTTT can be a real pain in some of the programming languages.

In ESP8266-Basic it is just a few lines of code:

iftttkey = "XXXYYYZZZXXXAA"
trig = "maker.ifttt.com/trigger/givenotice/with/key/" & iftttkey
print wget(trig)

And that really is all !!!!



Making an API call has never been easier in any programming language (as far as I know).


Final Words

ESP8266-Basic is really easy to work with and well documented.


Essentially it is Basic with loads of built in libraries. This makes sure that we can focus on the actual programming and not on putting all kinds of code together for just getting some sensors to work.....

The above shown examples are just a very small part of what ESP8266-Basic is capable off. I haven't discussed Telnet, Serial communications, Timers, File I/O, using the ESP I/O pins, Oled-LCD and TFT screen drivers, web-interface commands, email, web-graphics, mathematic and string functions, i2c, SPI, UDP and even Infrared control.

I sincerely thank the maker MMISCOOL for bringing such a great product to the ESP8266. And I am certainly going to use ESP8266-Basic in my future projects.

You can find the official ESP8266-Basic website here: https://www.esp8266basic.com/
The official webpage also contains examples and the complete manual :  https://www.esp8266basic.com/language-reference.html
And you can find a ton of information, projects and examples  on the ESP8266-Basic Forum: http://www.esp8266.com/viewforum.php?f=38

So till next time
Have fun

Luc Volders