Parameters:
Voltage input range: DC 0-25V
Voltage Detection range: DC 0.02445V-25V
Voltage Analog Resolution: 0.00489V
DC input connector: Terminal cathode connected VCC, anode to GND
Output Interface: "+" connect 5/3.3V, "-" connect GND, "s" the Arduino AD pins
전압 감지 범위는 DC 0-25V
스케치 예제 코드
##############################################
int val11;
int val2;
void setup()
{
pinMode(LED1,OUTPUT);
Serial.begin(9600);
Serial.println("Voltage: ");
Serial.print("V");
}
void loop()
{
float temp;
val11=analogRead(1);
temp=val11/4.092;
val11=(int)temp;//
val2=((val11%100)/10);
Serial.println(val2);
delay(1000);
}
'IT Tech > Hardware' 카테고리의 다른 글
[P2693]SPI I/F 2.2인치 IPS TFT LCD모듈 (0) | 2019.03.04 |
---|