This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Projeto de um contador dot matrix 5x7 com arduino Mega | |
| // Engenheiro José Cesar Ribeiro | |
| #include <TimerOne.h> | |
| #define S1 8 | |
| volatile byte x = 0; | |
| byte i = 0; | |
| byte c = 0; | |
| byte r = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| pinMode(led, OUTPUT); | |
| } | |
| void loop() { | |
| analogWrite(led, valor); // Escreve o valor no LED | |
| valor += incremento; // Aumenta o valor | |
| // Inverte o sentido quando chega no limite |