The goals for today is to

1. test:

  • reading temperature, humidity, and CO2 level.
  • posting readings on
  • update the design as I update the code.

2. fix leaks.


Connecting to WiFi

As I mentioned in a previous post, I’m using a Sparkfun ESP8266 WiFi Shield.

Frustrated A GOTCHA!

Sparkfun notes this hereWatch out! When you’re programming your Arduino (assuming it’s an ATmeg328P-based ‘duino), make sure the UART select switch is slid over towards the “SW” position. If it’s set to “HW”, all of those bits and bytes being programmed into the Arduino will also be sent over towards the ESP8266 — there’s a chance the spurious data might put the ESP8266 into an unknown (though recoverable) state.

I’m following along Sparkfun’s tutorial starting with downloading and installing their Arduino Library.  The tutorial points to the ESP8266_Shield_Demo as a reference point for programming.  So I try out the sample code…and…and…BUMMER.  The shield doesn’t initialize.  Now what?

Looking in SparkFunESP8266.h:

#define ESP8266_SW_RX9// ESP8266 UART0 RXI goes to Arduino pin 9

#define ESP8266_SW_TX8// ESP8266 UART0 TXO goes to Arduino pin 8


static SoftwareSerial swSerial(ESP8266_SW_TX, ESP8266_SW_RX);

bool begin(unsigned long baudRate = 9600, esp8266_serial_port serialPort = ESP8266_SOFTWARE_SERIAL);


and in SparkFunESP8266.cpp:

bool ESP8266Class::begin(unsigned long baudRate, esp8266_serial_port serialPort)


_baud = baudRate;

if (serialPort == ESP8266_SOFTWARE_SERIAL)



_serial = &swSerial;


else if (serialPort == ESP8266_HARDWARE_SERIAL)



_serial = &Serial;



if (test())


//if (!setTransferMode(0))

//return false;

if (!setMux(1))



if (!echo(false))








After littering the code with Serial.println()s, I found the failure is in test().  Sending the test AT command failed.  I’m going to try to manually send AT commands using CoolTerm.  I discussed CoolTerm in this post.

Frustrated EPIC FAIL

Thank you for contacting Sparkfun Technical Support

SparkFun Electronics  |  Jan 14, 2017 02:53PM MST 
Hi, Thank you for submitting your Technical Support request with us.

…and so I anxiously await expert advice from SparkFun’s technical support instead of spending more time banging my head. I guess my goal of connecting to will not happen today. Not a surprise. Connecting shields together can turn into a slog.

Fixing Leaks

Slowly making progress waiting for the glue to dry…