วันจันทร์ที่ 15 กุมภาพันธ์ พ.ศ. 2559
arduino acs712t elc-5A โมดูลกระแส วัตต์ โวล์
int analogPin=0;
int potentiometerPin=11;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(potentiometerPin,HIGH);
digitalWrite(potentiometerPin,HIGH);
}
void loop() {
// put your main code here, to run rep
//int analog=analogRead(analogPin);
int sensorValue=analogRead(A0);
float amps=(514-sensorValue)*27.03/1023; // สำหรับ 5A 185mV/A , v=vcc/2
float maxAmps=max(maxAmps,amps);
float minAmps=min(minAmps,amps);
float noise=maxAmps-minAmps;
Serial.print(amps);
Serial.print(" ");
Serial.println(noise);
if (Serial.read() !=1){maxAmps=amps;minAmps=amps;}
delay(250);
}
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
awakened from best wathces replica sleep, even the best proposal will be sleepy Laoxiuchengnu are wrecked. Speaking of the second time zone display in recent years, heat, would have to mention creative veteran who works rolex replicas swiss made in Athens (Ulysse Nardin) introduced GMT ±. The table is the first table without having to allocate handle “+” side of best replica IWC watches the case by the two.
ตอบลบ