Arduino-GPIO
General Purpose Input/Output (GPIO) library for Arduino
Pulse.ino
Go to the documentation of this file.
1 #include "GPIO.h"
2 
4 
5 void setup()
6 {
7  led.output();
8 }
9 
10 void loop()
11 {
12  // Pulse width 1..10 us, not interrupted
13  for (int width = 1; width < 11; width++)
14  led.pulse(width);
15 
16  // Delay 10 us but observe with logic analyzer variation 10,15 us
17  // as timer interrupts will occur here
18  delayMicroseconds(10);
19 }
void loop()
Definition: Pulse.ino:10
void setup()
Definition: Pulse.ino:5
void output()
Definition: GPIO.h:56
Definition: GPIO.h:31
GPIO< BOARD::D0 > led
Definition: Pulse.ino:3
void pulse(uint16_t width)
Definition: GPIO.h:146