Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int BT2 = 2; //botão 2 manual
- //Estado dos botões
- int EstadoBT2 = 0;
- void setup() {
- //Comunicação Serial
- Serial.begin(9600);
- // inicializa as entradas:
- pinMode(BT2, INPUT);
- // inicializa as saidas:
- }
- void loop(){
- // le valor botao:
- EstadoBT2 = digitalRead (BT2);
- // verifica se botao pressionado
- // verifica se botao esta estado alto:
- if (EstadoBT2 == HIGH) { //
- Serial.println(" FOGO! SETOR 1 E 2 FUDEU! CORRE MULAMBADA! ");
- delay (1000); // Atraso para ver melhor no monitor serial pode ser modificado
- }
- else {
- Serial.println(" SEM FOGO TRABALHA NA PAZ MULAMBADA! ");
- delay (1000); // Atraso para ver melhor no monitor serial pode ser modificado );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement