Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define PIN_LED_A 12 // Pino do LedA
- #define PIN_LED_B 13 // Pino do LedB
- bool EstadoLedA = 0; // Estado atual do LedA
- bool EstadoLedB = 0; // Estado atual do LedB
- //-------------------------------------
- void setup() {
- pinMode(PIN_LED_A, OUTPUT); // Pino do Led A = saida
- pinMode(PIN_LED_B, OUTPUT); // Pino do Led B = saida
- digitalWrite(PIN_LED_A , LOW);
- digitalWrite(PIN_LED_B , LOW);
- }
- //--------------------------------------
- void loop()
- {
- EstadoLedA = !EstadoLedA;
- digitalWrite(PIN_LED_A , EstadoLedA);
- delay(20);
- EstadoLedB = !EstadoLedB;
- digitalWrite(PIN_LED_B , EstadoLedB);
- delay(20);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement