Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 3.18 KB

File metadata and controls

45 lines (34 loc) · 3.18 KB

Installing Firmata on WeMos D1 Mini

Below are instructions on how to install firmware on the WeMos D1 Mini that allows its use with Johnny Five and other Node.js projects.

Initial Requirements

  1. Get a high quality micro-USB to USB cable. This cannot be understated. A cheap cable will only provide power and an unreliable data connection. Get a nice USB cable that you know can transfer data.
  2. Install the CH340G USB driver for your computer. In order to communicate over USB, you’ll need to install the proper USB to Serial driver: https://wiki.wemos.cc/downloads. This driver should be signed and ready to go. There are other unsigned versions available, but they are deprecated.
  3. Download the Arduino IDE Get the installable IDE, not the Web Editor. ArduinoIDE

Set up Arduino IDE

  1. Open the Arduino IDE.
  2. Open the Preferences... menu.
  3. In the Additional Board Manager URLs field, enter the following URL: ttp://arduino.esp8266.com/stable/package_esp8266com_index.json Board Manager URL Field
  4. Open the Tools menu and select Board > Board Manager...
  5. Search for "ESP8266" and install the esp8266 package. Board Manager
  6. In the Tools > Board select "WeMos D1 R2 & Mini" WeMos Selected

Download and Install the Firmata Firmware

  1. Go to the Firmata repository and download the .zip file. firmata zip
  2. Unzip the file into your Documents/Arduino/libraries/ folder. ("My Documents" on Windows).
  3. Restart the Arduino IDE
  4. Open the File menu. Select Examples > Firmata > StandardFirmataWifi. StandardFirmataWifi Menu
  5. This will open 2 files: StandardFirmataWifi and wifiConfig.h in your Arduino IDE. StandardFirmataWifi

Alter the Firmware to Work With a WeMos D1 Mini

  1. StandardFirmataWifi - Line 85: Uncomment #define SERIALL_DEBUG by deleting the //.
  2. StandardFirmataWifi - Link 998: Add analogWriteRange(255); between DEBUG_BIGIN(9600); and initTransport();.
  3. wifiConfig.h - Line 119: Replace "your_network_name" with the name of your wireless network (e.g. "WebWorkers Guest").
  4. wifiConfig.h - Line 151: Replace "your_wpa_passphrase" with the password for your Wifi network.
  5. Select File > Save As... and save your firmware with a new name like StandardFirmataWifi-Nodebots.

Install the Firmware

  1. Plug the WeMos D1 Mini board into a USB port on your computer.
  2. Open the Tools > Port > and select the USB Serial entry (it will look different on Mac vs. PC). serial
  3. Click the "Verify" button on the Arduino IDE (the checkmark).
  4. Then click the "Upload" button (the right-arrow) to upload the firmware to your WeMos. Upload 100%
  5. Open the Tools menu and select Serial Monitor. Change the baud rate to 9600 baud.
  6. Press the 'reset' button on the WeMos (a very tiny button near the USB port). You should see the WeMos reset in the Serial Monitor window, and print out an IP address. Serial Monitor.

That's it!