Hi there,
I have used the AnalogeReadSerial example code to connect a potentiometer.
What would I need to add to the code in order to add two or more potentiometers and 2 or more digital inputs?
I know this is the tipical nuwbe question but im kinda stuck so any help would be greatly appreciated.
This is the AnalogeReadSerial code :
/*
AnalogReadSerial
Reads an analog input on pin 0, prints the result to the serial monitor
This example code is in the public domain.
*/
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(A0);
Serial.println(sensorValue, DEC);
}
What would I need to add to the code in order to add two or more potentiometers and 2 or more digital inputs?
Some more analogRead expressions and some digitalRead expressions with appropriate variables.
Have a look at some of the examples that came with your Arduino distribution.
What would I need to add to the code in order to add two or more potentiometers and 2 or more digital inputs?
Some more analogRead expressions and some digitalRead expressions with appropriate variables.
Have a look at some of the examples that came with your Arduino distribution.