Alhamdulilah ! Success! After 12 days of continuous struggle of trying to make Firmata work with ESP-01, it is finally working. The following screenshot is a working proof.
So here is how i did it, I cleaned up all the Firmata instances from Arduino. This means i deleted Firmata from Libraries folder, in my case the path was :
and another location was:
Then i followed the solution presented in the firmata arduino github issue 257 which i interpreted as following steps :
- You need to install ESP8266 board in our arduino, follow installing the ESP8266 Arduino addon
- Clone the ESP8266 Firmata repository onto your local machine.
- Open the boards.h file into your editor.
- Add the ESP-01 board support by copy/pasting the following lines on Line 165 of the boards.h specified in step 2.
// ESP8266 generic #elif defined(ARDUINO_ESP8266_ESP01) #define TOTAL_ANALOG_PINS 0 #define TOTAL_PINS 17 #define VERSION_BLINK_PIN 4 #define IS_PIN_DIGITAL(p) ((p) == 0 || (p) == 2 || (p) == 4 || (p) == 5 || (p) == 12 || (p) == 13 || (p) == 14 || (p) == 15 || (p) == 16) #define IS_PIN_ANALOG(p) (false) #define IS_PIN_PWM(p) (false) #define IS_PIN_SERVO(p) ((p) >= 0 && (p) < MAX_SERVOS) #define IS_PIN_I2C(p) (false) #define IS_PIN_SPI(p) (false) #define PIN_TO_DIGITAL(p) (p) #define PIN_TO_ANALOG(p) ((p) - 17) #define PIN_TO_PWM(p) PIN_TO_DIGITAL(p) #define PIN_TO_SERVO(p) p
- Run the ./release.sh which will generate the Firmata-2.5.0.zip
- Open Arduino, go to Sketch -> Include Library -> Add Zip and add that zip.
- Then go back to the repository folder and open StandardFirmata example into Arduino.
- Upload it onto ESP-01.
- Open Firmata Test program.
- Select the correct port and you will see the result as shown in the screenshot above.
Next step is to use Clojure to control ESP-01 (which has StandardFirmata firmware).