ESPBasic on the ESP8266, A quick project to try it out.

ESPBasic on the ESP8266, A quick project to try it out.

I would like to thank Mmiscool (Michael Molinari) on the ESPBasic Community Forum without his help getting this to work would have taken a lot longer.

ESPBasic Is Fast Fun and Simple, yet powerful. I am going to keep my little test jig as a play thing

The ESP8266 is an Adafruit Hazzard Feather wifi I have had for a while. Everything else is pretty standard stuff.

ESPBasic Test Jig
ESPBasic Test Jig

Now here is the code:

‘___________________________________________________________________

memclear
cls
oled.cls()
Temp = 0
Hum = 0
PinDHT = 2
DHT.SETUP(11, PinDHT)

i2c.setup(4,5)
timer 4000, [branch] ‘ ## Timeer for auto refresh variables ##
oled.cls()
oled.print(“Current Temperature”, 10,1)
oled.print(str(DHT.TEMP()),10,10)
oled.print(“Current Humidity”, 10,18)
oled.print(str(DHT.HUM()),10,28)
oled.print(“Your IP is:”,10,36)
oled.print(ip(), 30,48)

Wait

[branch]
gosub [readdata]
wait

[readdata]
Temp = DHT.TEMP() ‘Current Temperature
Hum = DHT.HUM() ‘Current Humidity
Return

‘___________________________________________________________

That’s all there is to is, and being browser based easy to fiddle with and see results.

Lot’s of fun.   ESPBasic check it out.

 

Cheer’s  al

 

 

my first ebook

esp-8266ex-control-a-relay-from-anywhere 

Ebook $4.99AUD available from Kobo …

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *