Hi,
Can you please post some images of your project, in particular the level sensor array?
Did you purchase it or build it yourself?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
All this will help keep us all on the same page.
Thanks... Tom...
PS. I used to make custom level sensors like yours, and we spaced the reed switches so that there was not a gap between them when the magnet ascended or descended. They were wired to resistors so you got a change in resistance for level, so only three wires needed and an analog input.
The post i replied about was about light the one sensed and all below. The code in post #15 does not save the position of the last positive read nor restore it.
here, just so it doesn't get lost.
int level;
void loop () {
for (int i = 0; i < numReedSwitches; i++) {
if (LOW == digitalRead (reedSwitchPins[i])) {
level = i;
}
}
for (int i = 0; i <= numReedSwitches; i++) {
if (i <= level)
digitalWrite (ledPins[i], On);
else
digitalWrite (ledPins[i], Off);
}
}
This is what i got so far. ive had a look around and couldent find any sensors to fit the depth i needed, plus i find it more fun to do little diy projects
I did start off with resistors between the reed switches but changed it thinking it was to complicated for me.
This is great thanks, but i'd need too many reed switches to close the gaps between them. the depth i need is 3 feet, unless i use a much stronger magnet? hmm
Thanks for this, it works great, except it doesent light up the highest led when the highest switch is closed, and the bottom switch turns off all the leds when i'd really need the bottom led to remain lit if that makes sense