i thought i was in the clear when i learned how to use a threshold at higher math to eliminate jittering output of a potentiometer, and a "value != prevvalue" to eliminate identical data output.
suddenly, however, i am dealing with a great deal more noise than i was previously. sensors that i thought i'd dealt with using the above techniques are suddenly noisier than ever.
what introduces noise into an arduino system? how can i prevent this?
mappedccminval = map(ccminval, 0, 1023, 255, 0); // <= maps the analog data to 0-255 (twice the final output range)
if(mappedccminval != lastccminval){
if(abs(mappedccminval - prevccminval) >=THRESHOLD){
i have not decoupled anything thus far. i hope to decouple my IR sensor, but would rotary potentiometers also benefit from this?
in my case, the noise is on all of the analog inputs. i feel like i didn't have this before i put in my footswitch button, but it's impossible to tell really.
the case of the unit itself is not grounded. i will try this first to see if that makes a difference. otherwise, i'm using a screwshield for terminals, but everything else is soldered.
any further suggestions would be very appreciated.
no schematic. yet.
i ran a wire from the metal case to the arduino's ground, with no added success. the noise isn't coming from the case not being grounded.
i'm thinking about replacing the arduino dem with a rbbb arduino because there'd be more room in there for decoupling, etc...