Browse Source

les affaires repartent

master
phyto 3 years 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"
TMPFILE="/tmp/dd2data"
IMAGE="graphe.png"
NB_READ=2500
NB_READ=100
./t -vv -n ${NB_READ} -d ${DEVICE} | tee -a ${DATAFILE}
./t -n ${NB_READ} -d ${DEVICE} | tee -a ${DATAFILE}
gnuplot << __EOC__
set term png size 1280,640
set term png size 1600,640
set output "${IMAGE}"
set grid
set title "Temperature dans le Double Dragon 2"
@ -24,6 +24,6 @@ plot "${DATAFILE}" using 1:2 title " foo" with lines, \
"${DATAFILE}" using 1:5 title "booz" with lines
__EOC__
# display ${IMAGE}
# display ${IMAGE}

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

@ -4,7 +4,7 @@
/* -------------------------------------------------- */
#define NBVAL 4
#define DELAI 12000
#define DELAI 2000
/* -------------------------------------------------- */
void setup() {
@ -21,6 +21,7 @@ void setup() {
delay(1000);
Serial.print("M running\n");
}
/* -------------------------------------------------- */
/* ================================================== */
@ -31,8 +32,10 @@ void updatevalues(short *ptr)
int foo;
digitalWrite(LED_BUILTIN, HIGH);
for (foo=0; foo<NBVAL; foo++) {
ptr[foo] = analogRead(adc_pins[foo]);
delay(200);
// ptr[foo] = analogRead(A0);
delay(100);
}
digitalWrite(LED_BUILTIN, LOW);
}
@ -63,4 +66,3 @@ void loop() {
}
/* -------------------------------------------------- */

Loading…
Cancel
Save