Posts

Showing posts with the label IoT

ESP8266 low power DHT11 temperature and moisture remote sensor

Image
I have a problem with moisture in my loft.  After planning some intervention, I wanted a way to remotely monitor the humidity and temperature up there, and to visualise the data on a server.

ESP8266 as an HTTP client

Image
I recently blogged about how to setup an ESP8266 as a file server , in particular using SPIFFs to store the files.  But how can we retrieve HTML and general files from a web server?  In this post I'll demonstrate some code to make a request for a file from a server, then save the results on the SPIFFS on the ESP8266 client.  In terms of implementation, this works very well on a NodeMCU ESP-12E board.  I've also tried it on a ESP-01S board - there is a technical issue writing to SPIFFs within a program on some of the latest versions of this board.  There is a fix however, discussed at the end of this post.

ESP8266 as a SPIFFs File Server

Image
How to setup an ESP8266 board as a server using SPIFFs This how-to guide describes using an ESP8266 chip to setup a server to do what servers do... serve files!  If you want to know how to retrieve files from a web server, see my post on using the ESP8266 as a HTTP client .  Although HTML and other files can be contained within the program itself ("sketch" in the Arduino parlance), it is inconvenient, especially if you want to deposit images on the ESP-board, or change your files in and out easily.  The solution is use to SPIFFs, a file system that uses the on-board SPI flash chip, which can be written directly from your computer (and read and written from programmatically within your sketch too).  The amount of memory will vary depending upon the board in question.

Litter tray TwitterBot - BeemoPoops!

Image
The Internet of cat litter trays - TwitterTray The world almost certainly doesn't need an internet-enabled litter tray that sends an amusing tweet every time my cat uses it.  But the world wasn't consulted, and got it anyway.  Follow Beemo the cat's poops at  https://twitter.com/BeemoPoops . Above:  "You've put a Twitter-what on my litter tray now?!" - Beemo, the cat in the hat.

Tweeting from the ESP8266

Image
Other blogs have covered how to send data from the ESP8266 to a web server.  Sparkfun suggest a few services ( here ).  I've started playing around with ThinkSpeak .  The platform is great, and allows you to react to and visualise your data.  I have been looking for a way to post to Twitter from the ESP8266 for a project I've started working on and found that there wasn't a wealth of information.

The IR-egg: Voice-controlled ESP8266 I2S IR transmission!

Image
I recently posted on ESP8266: Minimum I2S code required for use I2S to accurately control output to a GPIO pin.  I also previously used a UART hack to use serial output to control an IR led .  This approach was a bit hacky though, requiring a few transmissions of the UART IR signal to get proper reception.  I thought that using the I2S protocol would be a really simple way of implementing an accurate IR signal transmission, modulated at 38 kHz.