ESPWatch

来自MakerFabsWiki
跳转至: 导航搜索

Introduction[编辑]

This ESPWatch starter Kit is for the beginners to learn how to create an ESP watch with detailed guide, it is for the starters to dive into the electronic world, with 1~2 hours’ learning, a non-electronic starter can create this ESP watch, to enjoy the joy of creating something by oneself.

The ESPWatch is based on ESP12 WIFI module, it gets the date/ time and the weather forecasting in few days from Internet server, and can also remote control the local instruments, such as Relay/LED/Fan. With this learning, you will learn the basic skill of components soldering/Arduino Programming/WIFI usage/Basic http protocol, the first& easy step to get into the electronic/programming world.
There we also prepared simple case/watchband, so that you can get it works on your wrist within few minutes.

Model: DIYKIT1

It can be an Internet Watch, with real Date&Time:

ESPWatch 1.jpg
And also a weather forecasting:
ESPWatch 2.jpg ESPWatch 3.jpg
And can be also a remote controller:
ESPWatch 4.jpg ESPWatch 5.jpg
Noted: This is a DIY kit, you will need to soldering by yourself.
There the detailed solder guide at : https://www.youtube.com/watch?v=gcKN0VuYRUo&feature=youtu.be

Features[编辑]

  • Kits with detailed guide for learners
  • Video for learning
  • Based on Arduino IDE/ESP
  • Real time watch + weather forecasting + Remote control
  • Open hardware+ Open software
  • For ages 12+

Package List[编辑]

  • 1 x DIY ESPWatch Components Kit
  • 1 x Mechanic case
  • 1 x Watchband
  • 1 x PL2303 USB2UART Programmer

DIY ESPWatch Guide[编辑]

1. Hardware Assembly[编辑]

The ESPWatch is a kit for customer assembling, users should firstly solder all the components. A soldering iron and some Tin wires are needed.
There the detailed soldering guide at youtube: https://www.youtube.com/watch?v=gcKN0VuYRUo

2. Setup Arduino IDE[编辑]

The ESPWatch is based on the Arduino IDE, if there no Arduino IDE in your Computer, please download the latest Arduino IDE at: https://www.arduino.cc/en/Main/Software
Makerfabs ESPWatch 6.jpg
Install the IDE and all the related drivers:
Makerfabs ESPWatch 7.jpg
Start the IDE, there would be a simple sketch by default:
Makerfabs ESPWatch 8.jpg

3. Add the ESP8266 core into Arduino IDE :[编辑]

Start Arduino and open Preferences window, and enter https://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs , and clink OK.
Makerfabs ESPWatch 9.jpg
And then you should find the ESP8266 in the Arduino IDE: Tools->board-> boards manager, let’s install it by click the “install”:
Makerfabs ESPWatch 10.jpg
After the installing, you can find the NodeMCU 1.0(ESP12E module) platform at Tools-> Board Menu:
Makerfabs ESPWatch 11.jpg

4. Install related library:[编辑]

There at least these libraries need to be installed:

• Ntpclient library
• Arduino-mqtt: https://github.com/256dpi/arduino-mqtt
• Thingpulse ESP8266 OLED SSD1306: https://github.com/ThingPulse/esp8266-oled-ssd1306
• TimeLib: https://github.com/PaulStoffregen/Time
• ESP8266 Weather Station
• JSON Streaming Parser by Daniel Eichhorn

We can seach "ntpclient","lwmqtt", " ESP8266 OLED Driver for SSD1306 display","timekeeping",“ESP8266 Weather Station”, ”JSON Streaming Parser” to find these libraries in library manager, and install them.

Open the sketch->include library->manage libraries
Makerfabs ESPWatch 12.jpg
Search all libraries, and install them all:
Makerfabs ESPWatch 13.jpg
Makerfabs ESPWatch 14.jpg
Makerfabs ESPWatch 15.jpg
Makerfabs ESPWatch 16.jpg
Makerfabs ESPWatch 17.jpg
Makerfabs ESPWatch 18.jpg

5. MQTT register for Time:[编辑]

1. Log-in the cloudMQTT(if no, you need to register an Account)
2. And Create a new instance:
Step_1:
Makerfabs ESPWatch 19.jpg
Step_2:
Makerfabs ESPWatch 20.jpg
And then here you can get the instance info:
Click the Instance Name:
Makerfabs ESPWatch 21.jpg
Instance Info:
Makerfabs ESPWatch 22.jpg

6. Weather forcasting:[编辑]

We use the thingpulse(https://docs.thingpulse.com/how-tos/openweathermap-key/) to get the weather forcasting data, the final data from openweathermap (https://openweathermap.org/price).

Let’s use the free data :
Makerfabs ESPWatch 23.jpg
After regestering, you will get your API key :
Makerfabs ESPWatch 24.jpg
And you can also check your city ID at:
Makerfabs ESPWatch 25.jpg

7. Hardware connection:[编辑]

Connect the ESPwatch to PC with PL2303 UART wire, the drivers at: http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41 After driver installed , it will act as a COMM port:

Makerfabs ESPWatch 26.jpg
Connect the PL2303 wire to ESPwatch programming port:
Makerfabs ESPWatch 27.jpg

8. Programming:[编辑]

Open the watch.ino sketches:
1. Change SSID and passowrd of the Wi-Fi, 2. Modify hostname, port, user and user_password for MQTT, 3. and the weather_map_ID and Location_ID
Makerfabs ESPWatch 28.jpg
And we can now update the codes to ESPWatch now. Select the right COM port and board in Arduino IDE:
Makerfabs ESPWatch 29.jpg
Makerfabs ESPWatch 30.jpg
Hold the FLASH button; Power on the ESP8266 by the SW1, while the FLASH button holding on, to put ESP8226 into bootloader mode:
Makerfabs ESPWatch 31.jpg
And click the upload to start the programming:
Makerfabs ESPWatch 32.jpg
If no exceptions happen, the ESPwatch works!

2. *Premuim* ESPWatch Remote Control[编辑]

The ESPwatch can be also use to control other modules, such as the ESP relay: https://www.makerfabs.com/index.php?route=product/product&product_id=534&search=ESP+relay, and thus to create remote control application, such as AC lamp/Fans.

Note that the ESP12S module with relay do not included in the kit, users need to purchase them separately.

1. Create a new MQTT instance[编辑]

Log-in the cloudMQTT(if no, you need to register an Account), and create a new instance: Makerfabs ESPWatch 33.jpg

2. Sketch Modification[编辑]

Open the sketches relay.ino, change SSID and passowrd of the Wi-Fi, and modify hostname, port, user and user_password for MQTT.

Noted: port must same as the watch.
Makerfabs ESPWatch 34.jpg

3. Programming[编辑]

Plug the ESP-01 on the ESP8266 debugger, and programming the ESP module, Select the right board to begin the programming
Makerfabs ESPWatch 35.jpg
Makerfabs ESPWatch 36.jpg
Makerfabs ESPWatch 37.jpg
And now you can connect the Relay to your AC lamp/Fan,etc, to make it remote controlled by the ESPWatch.

FAQ[编辑]

You can list you question here or contact with support@makerfabs.com for technology support.

Resources[编辑]