Software & Tools
Arduino IDE
Project description
Code
Read Six Analog Channels
arduino
1//Read the six 10-bit analog values from each potentiometer 2//and display them in an organized table on the Serial Monitor 3 4//variable declarations 5int A0value = 0; 6int A1value = 0; 7int A2value = 0; 8int A3value = 0; 9int A4value = 0; 10int A5value = 0; 11 12void setup() { 13 // put your setup code here, to run once: 14 Serial.begin(9600); 15 Serial.print("Readings from analog channels 0-5"); 16 Serial.print("\ 17\ 18"); 19 Serial.print("A0\ A1\ A2\ A3\ A4\ A5\ 20\ 21"); 22 23} 24 25void loop() { 26 // put your main code here, to run repeatedly: 27 A0value = analogRead(A0); 28 A1value = analogRead(A1); 29 A2value = analogRead(A2); 30 A3value = analogRead(A3); 31 A4value = analogRead(A4); 32 A5value = analogRead(A5); 33 34 Serial.print(A0value); 35 Serial.print('\ '); 36 Serial.print(A1value); 37 Serial.print('\ '); 38 Serial.print(A2value); 39 Serial.print('\ '); 40 Serial.print(A3value); 41 Serial.print('\ '); 42 Serial.print(A4value); 43 Serial.print('\ '); 44 Serial.print(A5value); 45 Serial.print('\n'); 46 delay(3000); 47 48}
Downloadable files
Circuit Schematic
Circuit Schematic

Circuit Schematic
Circuit Schematic

Comments
Only logged in users can leave comments