George timmermans
  • About Me
    • Resume
    • Press releases
  • Blog
  • Projects
    • Long Range WiFi Link
    • Embedded Systems >
      • Photo Booth
      • Classroom VU meter
      • USB Media Controller
      • Weather Station
      • Arduino Swimming Pool Controller
      • GRBL Android Controller
      • Arduino Serial Driver
      • Arduino Multitasking
      • 8x8x8 LED Cube
      • Analog -> Digital Geiger Counter
    • 3D Printing >
      • Simplify3d Configuration
      • 3D print repairs
    • Home Brewing >
      • Mead Recipes >
        • Cinnamon Mead
        • Sweet Chili Mead
        • Lemon & Ginger Mead
        • Mead Liqueur
        • Honey Beer
      • Glühwein (Spiced Wine)
      • Limoncello
    • House
    • Toolmaking
    • Laser Cutting
  • Weather Cam
  • Contact

Experimenting With The ESP8266

25/9/2015

0 Comments

 
I ordered myseld a ESP8266 (model ESP-201) WiFi module to experiment with. These modules are really popular at the moment because you can get the for 4NZD of eBay and consist of a 160mHz ARM processor and 512Kb of flash ( some versions have up to 4Mb) and have a full WiFi stack build in. They contain several IO pins that you can access and one analog to digital converter(ADC). It also support interrupts on most pins, 

While I wait for the module to arrive in the mail I decided to have a look what needs to be done to port my weather station code over to this device. Actually it is fairly simple. First you need to install the ESP8266 Arduino library and replace the ethernet library at the top of the sketch with the ESP8266 WiFi library. Second we need to change over from initialising the ethernet library to initialising the new wifi library. This includes the SSID and password of the network you are trying to connect to. Thats all that isrequired for connecting to wunderground through the ESP8266 with my original project code.

In my original code I use A1 for reading the position of the wind vane. The ESP8266 only has one ADC so the pin number to be used is A0. The ADC on the ESP8266 has an input voltage between 0V and 1.1V. A extra voltage divider is required to get a valid output when using a VCC of 3.3V.

Connect the anemometer to a valid interrupt capable pin in change accordingly in the code.

The Unified Sensor Library from Adafuit gave me an error along the lines of couldn't include <avr/pgmspace.h>. I fixed this by editing Adafruit_Sensor.cpp. The original looks like this:
#include "Adafruit_Sensor.h"
#include <avr/pgmspace.h>


I changed it to this:
#include "Adafruit_Sensor.h"
#ifdef ESP8266
    #include <pgmspace.h>
#else
    #include <avr/pgmspace.h>
#endif
Save the .cpp file and restart the Arduino IDE before recompiling the project code.

After these changes the code compiled without errors. Until I receive the actual hardware this is as much as I can do. Ones I tested the code with an ESP8266 i will make the ported code available on my github page.
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    George Timmermans, Research Toolmaker, Software Engineer and Tinkerer

    View my profile on LinkedIn

    Archives

    January 2021
    November 2020
    July 2020
    May 2020
    November 2019
    August 2019
    January 2019
    October 2018
    January 2018
    November 2017
    October 2017
    August 2017
    June 2017
    May 2017
    April 2017
    March 2017
    January 2017
    December 2016
    November 2016
    October 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015

    Categories

    All
    3d Printing
    Photobooth
    Wisp

    RSS Feed

Proudly powered by Weebly
  • About Me
    • Resume
    • Press releases
  • Blog
  • Projects
    • Long Range WiFi Link
    • Embedded Systems >
      • Photo Booth
      • Classroom VU meter
      • USB Media Controller
      • Weather Station
      • Arduino Swimming Pool Controller
      • GRBL Android Controller
      • Arduino Serial Driver
      • Arduino Multitasking
      • 8x8x8 LED Cube
      • Analog -> Digital Geiger Counter
    • 3D Printing >
      • Simplify3d Configuration
      • 3D print repairs
    • Home Brewing >
      • Mead Recipes >
        • Cinnamon Mead
        • Sweet Chili Mead
        • Lemon & Ginger Mead
        • Mead Liqueur
        • Honey Beer
      • Glühwein (Spiced Wine)
      • Limoncello
    • House
    • Toolmaking
    • Laser Cutting
  • Weather Cam
  • Contact