Posts

Showing posts with the label ESP-01S

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.

Over The Air Firmware updates

Image
Updating ESP8266 firmware over WiFi is the coolest thing *ever*.  I recently got it working on an ESP-01S board, and it was a breeze.  There is 1M of flash memory on my ESP-01S, and that might be important.  We need at least twice the sketch size space in order for the code to work.  There is something very satisfying about sending a program off over the home WiFi to an ESP8266 board stashed in another room!

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.

ESP8266: Minimum I2S code

Image
Question: What's the most convoluted way to flash an LED on an ESP8266? Answer : Using DMA (Direct Memory Access) and to output to a GPIO using the I2S protocol of course! Outputting memory straight to an LED using I2S 

Sending IR remote control signals

Image
In my previous post , we looked at how to grab an 38 kHz modulated IR signal, analyse and process it. Now we'll look at a couple of different ways to transmit a modulated IR signal - first with an Arduino Nano, and then with an ESP-01S board. UPDATE: I have now used I2S to accurately transmit a modulated IR signal with the ESP8266 chip

Hey Alexa, switch on Project

Image
Setting up Arduino IDE for ESP8266, ESP-01S and FauxMo. Hey Alexa, are you listening? I've been interested in playing around with some ESP8266 modules for ages.  In case you have been living under a rock for the last few years, the ESP8266 has taken the hobby-world by storm as the way of getting WiFi easily into a project.  In fact you need to catch up, because the ESP32 has come hot on the ESP8266 heels.  Sometimes choice can be a curse, and it seems that way to me with the ESP8266 board - there are a veritable plethora of boards available. So where to start from?  I like to keep my form factor small and keeps things as simple as possible, so decided to opt for the ESP-01S board, which is albeit limited in terms of GPIO pins (only two), but is really the barebones of an ESP8266 board - small with no other voltage regulators, so we are in control.  In retrospect, I think I would now have gone for a Wemos Mini-D1 as you get so much more in terms USB hookup...