Software

Software setup

To begin writing code for the mote, prepare your computer as described:

  1. Download and install the Arduino IDE for your platform
  2. Go to https://github.com/esp8266/Arduino and follow the instructions to add ESP8266 board support in the Arduino IDE
  3. Check to make sure that you have connected a LiPo battery to the mote
  4. Connect the FTDI USB connection from your computer to the programmer board
  5. Plug in the mote to the programmer board.
  6. Launch the Arduino application
  7. In the Arduino application, the Serial port of your FTDI cable should be detected. Change the Port to reflect this (under Tools > Port ...)
    • On the PC this shows up as a COMx port
    • On the Mac you'll get a /dev/cu.SLAB_USBtoUART entry
    • Choose the appropriate port and make sure a checkmark appears next to it
    • Drivers are installed automatically by Windows 10 / macOS Catalina. If for any reason the port does not appear, you might want to install the drivers manually. Also, restart your computer after installation if this still fails.
    • Use a good quality USB micro cable that you know is capable of data transfer, not just USB charging. A working USB data cable is one that you know works when connecting a device that sends digital data back your laptop. Unfortunately it is very hard to tell them apart visually – low-cost micro USB charging cables do not have the Rx/Tx lines soldered to the terminals.

  1. Choose Tools > Board > Generic ESP8266 Module and use the following settings:

  2. To test if everything went well, upload the Blink sketch at File > Examples > ESP8266 > Blink. Connect an LED circuit to pin IO2. You should be able to get it to blink at the interval defined in example sketch.

  3. One of the gripes about the ESP8266 is that uploading firmware in the Arduino IDE takes a bit more time compared to the Arduino UNO, so be patient and monitor the status pane in the Arduino IDE. The mote mini will reset itself once the upload is complete and start running your sketch

  4. WARNING: Check your flash size – this is shown to you whenever you attempt to upload a sketch. Typically this is 2 megabytes (2M), you might encounter chips that have 4 or 6MB. To be absolute sure, upload the ESP8266 > CheckFlashConfig sketch, open the Serial Monitor in Arduino, check the output and update the board settings accordingly.

  5. Explore the other examples in the ESP8266 Examples section!

  6. You'll most likely be using Fritzing to document your breadboard circuit & schematic, so download the custom Fritzing parts below: