Search code examples
arduinoparticle-photon

"Arduino" undefined using HX711 library with Particle Photon


I'm trying to make an IoT scale using HX711 technical with a cell and a particle photon.

When flashing the code to Photon I receive an error in the library:

In file included from weightsensor.ino:3:0:
HX711.h:4:5: warning: "ARDUINO" is not defined [-Wundef]
 #if ARDUINO >= 100

Is there any other library which is not arduino specific or is there a way to fix this in an easy way?


Solution

  • There is a HX711 library for Particle devices maintained by the community: HX711ADC.

    You can use it in the Web IDE, CLI or the Desktop IDE.