apero du mercredi soir, no bug spotted
This commit is contained in:
parent
e6f4bf7a0f
commit
6583891486
4
plot.sh
4
plot.sh
|
@ -7,10 +7,10 @@ DATAFILE="serial/foo.dat"
|
||||||
IMAGE="graphe.png"
|
IMAGE="graphe.png"
|
||||||
TMPFILE="/tmp/tmpdata"
|
TMPFILE="/tmp/tmpdata"
|
||||||
|
|
||||||
tail -700 < ${DATAFILE} > ${TMPFILE}
|
tail -1200 < ${DATAFILE} > ${TMPFILE}
|
||||||
|
|
||||||
gnuplot << __EOC__
|
gnuplot << __EOC__
|
||||||
set term png size 1000,700
|
set term png size 1400,700
|
||||||
set output "${IMAGE}"
|
set output "${IMAGE}"
|
||||||
set ytics 2
|
set ytics 2
|
||||||
set xtics
|
set xtics
|
||||||
|
|
|
@ -12,6 +12,7 @@ void setup() {
|
||||||
pinMode(LED_BUILTIN, OUTPUT);
|
pinMode(LED_BUILTIN, OUTPUT);
|
||||||
|
|
||||||
Serial.print("\n");
|
Serial.print("\n");
|
||||||
|
|
||||||
/* XXX */
|
/* XXX */
|
||||||
/* changing the voltage reference of the ADC
|
/* changing the voltage reference of the ADC
|
||||||
* greatly increase the prcision on the limited
|
* greatly increase the prcision on the limited
|
||||||
|
@ -32,9 +33,8 @@ void updatevalues(short *ptr)
|
||||||
{
|
{
|
||||||
short foo, pass;
|
short foo, pass;
|
||||||
|
|
||||||
for (foo=0; foo<NBVAL; foo++) {
|
for (foo=0; foo<NBVAL; foo++) { ptr[foo] = 0; }
|
||||||
ptr[foo] = 0;
|
|
||||||
}
|
|
||||||
digitalWrite(LED_BUILTIN, HIGH);
|
digitalWrite(LED_BUILTIN, HIGH);
|
||||||
for (pass=0; pass<NB_PASSE; pass++) {
|
for (pass=0; pass<NB_PASSE; pass++) {
|
||||||
for (foo=0; foo<NBVAL; foo++) {
|
for (foo=0; foo<NBVAL; foo++) {
|
||||||
|
@ -42,9 +42,9 @@ void updatevalues(short *ptr)
|
||||||
delay(100);
|
delay(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (foo=0; foo<NBVAL; foo++) {
|
|
||||||
ptr[foo] /= NB_PASSE;
|
for (foo=0; foo<NBVAL; foo++) { ptr[foo] /= NB_PASSE; }
|
||||||
}
|
|
||||||
digitalWrite(LED_BUILTIN, LOW);
|
digitalWrite(LED_BUILTIN, LOW);
|
||||||
}
|
}
|
||||||
/* -------------------------------------------------- */
|
/* -------------------------------------------------- */
|
||||||
|
@ -67,6 +67,7 @@ void update_and_send(void)
|
||||||
updatevalues(values);
|
updatevalues(values);
|
||||||
sendvalues(values);
|
sendvalues(values);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
Loading…
Reference in New Issue