Life Clock

Clock with Internet synced LCD time and date display, and touch screen display used for weather but functionality can be expanded.
You are viewing an older revision! See the latest version
The WiFi Setup
The Wifi Setup¶
A primary functionality of Life Clock is its internet connectivity, with auto time updates and preferably a weather summary as well. We used the ESP8266 wifi module to provide this. Below I summarise the steps involved with setting this up.
Wiring up the module¶
We found the data page on https://cdn.instructables.com/FV1/45EH/IC4MPIMS/FV145EHIC4MPIMS.MEDIUM.jpg useful to wire it up to the mbed. One important difficulty was realizing that the receiver (Rx) pin from the module connects to the transmitter (Tx) pin from the board and vice versa.
Powering the module was tricky. It receives 3.3V but requires around 150mA, higher than is available from the board's 3.3V outputs. After initially trying to do so via the on board power supply we moved to using a regulator circuit to connect the 3.3V input to the board's 5V output, before finally using a seperate 3.3V power supply with an external power input.
Coding the module¶
The majority of the coding effort went into understanding how to get the board to speak to the module. The mbed page from a previous Oxford CWM team at https://developer.mbed.org/teams/Oxford-CWM-Team/wiki/esp8266-mbed-setup-and-control was very helpful in doing so. This takes the form of establishing a Serial to communicate with the PC and another RawSerial to do so with the board.
After doing this I used the .attach() method to set routines to listen for communication in both directions from the ESP and the PC. After this we had full manual control of the ESP and were able to begin sending commands.
The ESP commands are all listed in this datasheet https://cdn.sparkfun.com/assets/learn_tutorials/4/0/3/4A-ESP8266__AT_Instruction_Set__EN_v0.30.pdf, of which we used the following sequence to start the module:
/insert startup sequence
Import programWifiReceiver
Communicates with the WiFi - be very careful when using as it is tempremental.
Requesting Information¶
Howe this is dopne etc
Filtering Information¶
MOre here