User Tools

Site Tools

한국어

faduino:monitoring_analog_inputs_in_the_serial_console:index

Monitoring Analog Inputs in the Serial Console

The following program will read the analog inputs A0 and A4, and display their values on the serial console.

int ADI_Value0;
int ADV_Value4;
 
void setup() {
   Serial.begin(9600);
}
 
void loop() {
    ADI_Value0 = analogRead(A0);
    delay(100);
    ADV_Value4 = analogRead(A4);
    delay(100);
    Serial.print(" CH 0 = "); Serial.print(ADI_Value0);
    Serial.print("\n" );
    Serial.print(" CH 4 = "); Serial.print(ADV_Value4);
    Serial.print("\n\n" );
    delay(200);
}

FA-DUINO Industrial Arduino

faduino/monitoring_analog_inputs_in_the_serial_console/index.txt · Last modified: 2022/11/20 08:09 by COMFILE Technology