-
Notifications
You must be signed in to change notification settings - Fork 0
/
ENSABrewLED.ino
54 lines (48 loc) · 1.84 KB
/
ENSABrewLED.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//*******************************************************************************************
// Arquivo C/C++ do Projeto Controlador de Patamares -- ENSABrewControll
//-------------------------------------------------------------------------------------------
//
// Arquivo: ENSABrewLED.ino
//
//
// Autor : Jânio Anselmo, Eng. Me.
// Autor : Thiago Anselmo, Tecgº
// Autor : Gabriel da Silva Caetano
//
// CPU : ATMega2561 - MegaCore
// Clock : 16MHz
//
//*******************************************************************************************
//WWWWWWWWWW*********************************************************************************
// Função: piscaLed
// Data : 04/04/2017 13:45
//WWWWWWWWWW*********************************************************************************
void piscaLed(unsigned int pinLed)
{
boolean ledOn = digitalRead(pinLed);
if (ledOn) digitalWrite(pinLed, LOW);
else digitalWrite(pinLed, HIGH);
}
//WWWWWWWWWW*********************************************************************************
// Função: piscaLedsAlarme
// Data : 04/04/2017 13:45
//WWWWWWWWWW*********************************************************************************
void piscaLedsAlarme(void )
{
boolean status1 = digitalRead(LED_VERMELHO1);
if (status1) digitalWrite(LED_VERMELHO1, LOW);
else digitalWrite(LED_VERMELHO1, HIGH);
boolean status2 = digitalRead(LED_VERMELHO2);
if (status2) digitalWrite(LED_VERMELHO2, LOW);
else digitalWrite(LED_VERMELHO2, HIGH);
}
//WWWWWWWWWW*********************************************************************************
// Função: desligaLeds
// Data : 04/04/2017 13:45
//WWWWWWWWWW*********************************************************************************
void desligaLeds(void )
{
digitalWrite(LED_AMARELO, LOW);
digitalWrite(LED_VERMELHO1, LOW);
digitalWrite(LED_VERMELHO2, LOW);
}