Code 4: //The demo code is ADC INPUT You can copy the code to your Arduino IDE
Code:
#define ANALOG_PIN_32 32 //INA1 CH5
// #define ANALOG_PIN_33 33 //INA2 CH4
// #define ANALOG_PIN_34 34 //INA3 CH6
// #define ANALOG_PIN_35 35 //INA4 CH7
void setup(){
Serial.begin(115200);
pinMode(ANALOG_PIN_32,INPUT);
}
void loop() {
int analog_value = 0;
analog_value = analogRead(ANALOG_PIN_32); //0--4096
delay(1000);
Serial.printf("Current Reading on Pin(%d)=%d\n",ANALOG_PIN_32,analog_value);
}