TSGames1 3 tahun lalu
induk
melakukan
4843fcde1c
1 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 4 4
      arduino/arduino.ino

+ 4 - 4
arduino/arduino.ino

@@ -9,10 +9,10 @@ void setup() {
 
 void loop() {
   unsigned int val=abs(analogRead(A0));
-  unsigned long V=round(val * 0.006270 * 1000);
-  Serial.println(V);
-  Serial.println(V << 8 | 0x00);
-  rcSwitch.send(V << 8 | 0x00, 24);
+  unsigned long U=round(val * 0.006270 * 1000);
+  Serial.println(U);
+  Serial.println(U << 8 | 0x00);
+  rcSwitch.send(U << 8 | 0x00, 24);
   delay(1000);  
 }