I was thinking of hacking the StandardFirmata code a little bit in order to add two pinModes (besides Input, Output, PWM and Servo): - ping, for use with a ping distance sensor like this http://www.arduino.cc/playground/Main/UltrasonicSensor - capacitive, for using the pin as a capacitive sensor like this http://arduino.cc/playground/Code/CapacitiveSensor
When set in one of these mode, the pin would behave from the PC's point of view as an analog pin, sending in measured values continuously.
Has anybody already done something similar? (I'm hoping yes)
Otherwise, any advice to start with? Such as which is the most relevant part of the code of the StandardFirmata sketch that I should look at, or any similar example to look at? Is this something that you can do without hacking the Firmata library itself, just changing the top-level program?
Part of these questions may sound stupid, I don't have a deep knowledge of the Firmata internals, and I don't alway know very well where the Firmata protocol ends and Standard Firmata as a whole program starts......
Thanks in advance cheers m.