audiocommander Posted March 26, 2006 Report Share Posted March 26, 2006 I agree with you, but why linearizing reduce resolution ?? ???I linearized the measured result in my host application with a log calculation. It decreased the resolution by a (for me) unacceptible amount. I have no problem with the default behavior: the nearer you get to the sensor, the higher the resolution; in a way this behavior seems quite natural to me.I don't really understand what you are doing with "tiny resistors" ? Where do you place them and for what ?Well, that depends on the type of sensor. Maybe I wasn't clear enough: If you have any other AIN-devices connected besides the GP-Distance Sensor and "normal" 10k-Pots, you should check if their wiring is ok; I talked about correct use of pull-up/pull-down resistors, but that really depends on if and what else you have connected to the AIN module; normally you need pull-up/-down resistors if using resistor-based sensors, eg. pressure- or position-sensors.This was meant just as an hint, that maybe something else than the GPs could be the reason for extraordinary unpredictable signals.Do you use a AIN module or do you directly solder on the Core ?Via AIN module. But I think it makes no big difference besides some code-adjustments.Again: I'm using two GPs very successfully with the above mentioned C-Code. No Jittering.I really suggest you take a look at the code. It simply reduces the number of readings without affecting the overall resolution and interpolates the min/max values to 0..127. It also provides a gate for filtering out too low signals. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.