Search code examples
arduinoarduino-unofirmata

Firmata, undeclared PULSE_IN erorr


I am trying to use the HC-SR04 and utilize the results in a python script. For this I using the StandardFirmata.ino sketch from: https://github.com/jgautier/arduino-1/blob/pulseIn/examples/StandardFirmata/StandardFirmata.ino

When I try to upload the file to my Arduino UNO I get an error.Screenshot of the error message.

How do I fix this error? Is there an alternative version of Firmata I can use that still supports .ping()?


Solution

  • I did not install the .ping() capable Firmata correctly. You can not just swap the .ino files with the StandardFrimata available at Examples in the Arduino IDE. The files include Firmata.h which has defines for many macros used by the sketch. Since I was using the .h file from a normal Firmata the PULSE_IN macro was not defined.