It is a physical layout diagram.
Thanks.
output the two bit patterns to switch the two pots into the analogue input port, and output the values accordingly.
You mean the
r0 = bitRead(count,0);
r1 = bitRead(count,1);
r2 = bitRead(count,2);
digitalWrite(2,r0);
digitalWrite(3,r1);
digitalWrite(4,r2);
part?
What is this supposed to be doing:-
Code:
if (abs(analRead[count] - analValue[count]) >= 2) {
analogWrite(ledPin[count], analRead[count]);
analValue[count] = analRead[count];
I was trying to output the value just when it changes and not always.
Divide the result of the analogRead by four before transferring it to analogWrite.
and what is this? I can't see threshold making an appearance.
You're right, I was a bit in a hurry and didn't notice these errors. I grounded all the unused inputs of the multiplexer, is it a precaution to avoid unwanted readings?
What's with folks using obsolete parts?
Many reasons: I had it at home and didn't want to go buy a different one, I found endless discussions, posts and even an official tutorial on the arduino's forum and website, and the 4051 is an analog multiplexer the MCP3008 is an analog to digital converter which (from my beginner's opinion) are two different things used for different purposes.