Diferencia entre revisiones de «Taller de Arduino»
Syntax highlighting!! |
Sin resumen de edición |
||
| Línea 84: | Línea 84: | ||
ITimer1.init(); | ITimer1.init(); | ||
ITimer1.attachInterruptInterval(TIMER1_INTERVAL_MS, TimerHandler1, outputPin1); | ITimer1.attachInterruptInterval(TIMER1_INTERVAL_MS, TimerHandler1, outputPin1); | ||
} | |||
void loop() { | |||
} | |||
</syntaxhighlight> | |||
===Código 5=== | |||
<syntaxhighlight lang="c++" line copy> | |||
#include <SPI.h> | |||
#include <SD.h> | |||
File f; | |||
void setup() { | |||
pinMode(A5, OUTPUT); | |||
SD.begin(4); | |||
f = SD.open("data.txt", FILE_READ); | |||
int x = f.parseInt(); | |||
for (int i = 0; i < x; i++) { | |||
digitalWrite(A5, HIGH); delay(300); | |||
digitalWrite(A5, LOW); delay(300); | |||
} | |||
} | } | ||