Browse Source

adding blinkenlight

tth 1 year ago
parent
commit
71534c19bc
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      simulator/rdtemp/rdtemp.ino

+ 5
- 2
simulator/rdtemp/rdtemp.ino View File

@@ -10,6 +10,7 @@
10 10
 void setup() {
11 11
   Serial.begin(9600);
12 12
   pinMode(LED_BUILTIN, OUTPUT);
13
+  
13 14
   Serial.print("\n");
14 15
   /* XXX */
15 16
   /*  changing the voltage reference of the ADC
@@ -28,10 +29,12 @@ short adc_pins[] = { A0, A1, A2, A4 };
28 29
 void updatevalues(short *ptr)
29 30
 {
30 31
   int foo;
32
+  digitalWrite(LED_BUILTIN, HIGH);
31 33
   for (foo=0; foo<NBVAL; foo++) {
32 34
     ptr[foo] = analogRead(adc_pins[foo]);
33
-   delay(200);
34
-   }
35
+    delay(200);
36
+    }
37
+  digitalWrite(LED_BUILTIN, LOW);
35 38
 }
36 39
 /* -------------------------------------------------- */
37 40
 void sendvalues(short *ptr)

Loading…
Cancel
Save