Browse Source

les affaires repartent

phyto 1 year ago
parent
commit
17ec8dd47d
2 changed files with 9 additions and 7 deletions
  1. 4
    4
      serial/essai.sh
  2. 5
    3
      simulator/rdtemp/rdtemp.ino

+ 4
- 4
serial/essai.sh View File

@@ -5,12 +5,12 @@ DATAFILE="foo.dat"
5 5
 TMPFILE="/tmp/dd2data"
6 6
 
7 7
 IMAGE="graphe.png"
8
-NB_READ=2500
8
+NB_READ=100
9 9
 
10
-./t -vv -n ${NB_READ} -d ${DEVICE} | tee -a ${DATAFILE}
10
+./t -n ${NB_READ} -d ${DEVICE} | tee -a ${DATAFILE}
11 11
 
12 12
 gnuplot << __EOC__
13
-set term png 	size 1280,640
13
+set term png 	size 1600,640
14 14
 set output 	"${IMAGE}"
15 15
 set grid
16 16
 set title	"Temperature dans le Double Dragon 2"
@@ -24,6 +24,6 @@ plot	"${DATAFILE}" using 1:2 title " foo" with lines, \
24 24
 	"${DATAFILE}" using 1:5 title "booz" with lines
25 25
 __EOC__
26 26
 
27
-# display ${IMAGE}
27
+# display ${IMAGE}
28 28
 
29 29
 

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

@@ -4,7 +4,7 @@
4 4
 /* -------------------------------------------------- */
5 5
 
6 6
 #define NBVAL   4
7
-#define DELAI   12000
7
+#define DELAI   2000
8 8
 
9 9
 /* -------------------------------------------------- */
10 10
 void setup() {
@@ -21,6 +21,7 @@ void setup() {
21 21
   
22 22
   delay(1000);
23 23
   Serial.print("M running\n");
24
+  
24 25
 }
25 26
 /* -------------------------------------------------- */
26 27
 /* ================================================== */
@@ -31,8 +32,10 @@ void updatevalues(short *ptr)
31 32
   int foo;
32 33
   digitalWrite(LED_BUILTIN, HIGH);
33 34
   for (foo=0; foo<NBVAL; foo++) {
35
+    
34 36
     ptr[foo] = analogRead(adc_pins[foo]);
35
-    delay(200);
37
+    // ptr[foo] = analogRead(A0);
38
+    delay(100);
36 39
     }
37 40
   digitalWrite(LED_BUILTIN, LOW);
38 41
 }
@@ -63,4 +66,3 @@ void loop() {
63 66
 }
64 67
 
65 68
 /* -------------------------------------------------- */
66
-

Loading…
Cancel
Save