I have a Sharp 100-500cm IR distance sensor.
I've tried to follow the blog posts online, but can't figure it out. I have wired up an MCP3008 as per http://jeremyblythe.blogspot.co.uk/2012 ... nputs.html and I've tried to follow the directions from Adafruit on wiring up the sensor. If I use the code to translate distance, I get anywhere between 30-50cm (which clearly isn't right for a sensor for 100-500cm).
I've got the 220uF capacitor that came with the sensor in there, but I'm not sure I'm putting it in the right place to be effective. I can't find any examples of where to actually put the capacitor in relation to the VCC/GND of the sensor other than the sentence "Connect the + pin of the capacitor to the Vcc wire connection, and the - pin of the capacitor to the GND wire connection". Does that actually mean
VCC(5v)---(sensor VCC)----Capacitor---(sensor GND)---GND
Any ideas what I'm doing wrong?