The best tools to make your project dreams come true

Login or Signup

By ShawnHymel

ESP8266 IoT Temperature Sensor

In the fourth episode of my Bantam Tools milling machine video series, I show how to create a double-sided printed circuit board (PCB) for fast and easy prototyping.


To view parts 1 - 3 click the links below.

In an effort to create a reason for why someone might need a double-sided PCB, I threw together a quick-and-dirty Internet of Things (IoT) sensor using an ESP8266 and an MCP9808 temperature sensor. As to be expected, I used KiCad to create the PCB. In a sense, I created a sort of “temperature sensor throwie.”

If you would like to create your own version of this throwie or use it as the basis for your own IoT sensor design, you are more than welcome to download the schematic, layout files, and code from the following GitHub repository:

If you are curious about the electrical design, it can be found in PDF form here.

You will need to mill your own board or send out the KiCad layout files for production by a professional manufacturer. If you want solder mask and silkscreen, you will need to run a new set of gerbers from within KiCad.


Next, order the parts found in the bill of materials (BOM) and solder them to the board. You will need to connect a Serial-to-USB converter to upload code to the board.


Press and hold both buttons. Release the RESET button while still holding the PROG button. After 1-2 seconds, release the PROG button. This will put the ESP8266 in bootloader/programming mode. From here, you can upload the esp8266-temp-get.ino Arduino sketch found in the Firmware section of the repository. Don’t forget to update the WiFi SSID and password along with your server’s IP address.

With Python installed, run the program found in the Software section of the repository. This will run a simple web server that listens for HTTP requests on your computer. Plug in power to the ESP8266, and it should connect to your network. After a moment, it will sample temperature from the sensor and send that to your web server. Temperature readings should be printed to the console.


And there you have it! A fast prototype of an IoT device that transmits temperature data over WiFi to a local server.

Key Parts and Components

Add all Digi-Key Parts to Cart
  • 478-5030-1-ND
  • 478-12141-1-ND
  • 478-1395-1-ND
  • 160-1427-1-ND
  • S5597-ND
  • 455-1719-ND
  • 311-220CRCT-ND
  • 311-10.0KCRCT-ND
  • 311-4.70KCRCT-ND
  • 311-1.00KCRCT-ND
  • 450-1650-ND
  • AP2112K-3.3TRG1DICT-ND
  • MCP9808-E/MS-ND
  • 1904-1009-1-ND