3

I've done some basic apps with NodeJS firmata where I can connect to my Arduino Uno and do the basics like reading a pin or doing a servo write. I'd like to go further and play with some different sensors from vendors like Adafruit.

Many such sensors appear to come with their own Arduino libraries. Using NodeJS firmata to communicate with my Uno, could I somehow use the sensor libraries? Maybe by including their header files in the Standard Firmata sketch before uploading or...? But then I don't know how I'd get at their methods from my NodeJS app.

Even better, I'd love a little direction on how to go about using an Arduino sensor library in a sketch, and use Galileo-IO to interact with the sensor that way, if possible.

1 Answer 1

1

Including the header files for the libraries in the standard Firmata sketch is only the first step. You will have to also modify the sketch in order to actually use the libraries. You will have to figure out a way of interacting with the libraries through the Firmata protocol and implement this in your modified version of the sketch. You will then have to modify the JavaScript side to enable these new interactions. That's where you will write the missing methods

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.