I'm kinda new to arduino and I'm currently facing some difficulties.
I've bought some cd74hc4067 16 channel multiplexers and tried to use them MANY TIMES in all different ways to read analog inputs without succes. I've checked the wiring( various wirings ), many libraries
and custom code, but I keep on getting messed, extremely erratic readings. When i change the value to any pin, it all just goes crazy and the readings are mixed up for all 16 pins, according to this slight change.
( I use pots and antennas as analog sensors ). Any help?
Give us your schematic, sketch (in code tags), details of your sensors and what type of Arduino, perhaps some detailed clear photos, example output....
Problem solved! It seems I just forgot to connect each single sensor to the ground separately (through a 3.3 M Ω resistor). What I was doing instead, was to connect only the SIG pin to GND. I saw some other people in the forum having the same problem, so here is a solution.
I was actually using multiple sensors ( hall effect sensors, custom made gyro, a custom made ir range detector and an altimeter for a UAV project ) looks like the four hall effect sensors I was using needed four seperate connections to GND to properly work. (inspired by http://bildr.org/2011/04/various-hall-effect-sensors/ to make a compass for my UAV)