adding blinkenlight
This commit is contained in:
parent
f3dfe77e3a
commit
71534c19bc
@ -10,6 +10,7 @@
|
|||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
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
|
||||||
@ -28,10 +29,12 @@ short adc_pins[] = { A0, A1, A2, A4 };
|
|||||||
void updatevalues(short *ptr)
|
void updatevalues(short *ptr)
|
||||||
{
|
{
|
||||||
int foo;
|
int foo;
|
||||||
|
digitalWrite(LED_BUILTIN, HIGH);
|
||||||
for (foo=0; foo<NBVAL; foo++) {
|
for (foo=0; foo<NBVAL; foo++) {
|
||||||
ptr[foo] = analogRead(adc_pins[foo]);
|
ptr[foo] = analogRead(adc_pins[foo]);
|
||||||
delay(200);
|
delay(200);
|
||||||
}
|
}
|
||||||
|
digitalWrite(LED_BUILTIN, LOW);
|
||||||
}
|
}
|
||||||
/* -------------------------------------------------- */
|
/* -------------------------------------------------- */
|
||||||
void sendvalues(short *ptr)
|
void sendvalues(short *ptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user