void setAmountOfAlarm(int mode)
{
	alarmStatus = mode;
	switch (mode)
	{
	case 0:
		LedControl(LED_OFF);
		break;
	case 1:
		LedControl(LED_ON);
		break;
	case 2:
		break;
	default:
		break;
	}
	LedControl(LED_TOGGLE);
}
Exemplo n.º 2
0
LedControl  initMatrizLeds(){

  LedControl lc = LedControl(DIN,CLK,CS,NUM_MATRIX);
  lc.shutdown(0,false);// turn off power saving, enables display
  lc.setIntensity(0,1);// sets brightness (0~15 possible values)
  lc.clearDisplay(0);// clear screen 
  
  return lc;
}
Exemplo n.º 3
0
/*
 This time we have more than one device.
 But all of them have to be initialized
 individually.
 */
void setup()
{
	lc=LedControl(12,11,10,1);

	/*
     The MAX72XX is in power-saving mode on startup,
     we have to do a wakeup call
     */
    lc.shutdown(0,false);
    /* Set the brightness to a medium values */
    lc.setIntensity(0,8);
    /* and clear the display */
    lc.clearDisplay(0);
}
void updateScreenBackLight()
{
	if (alarmStatus == 2)
	{
		LedControl(LED_TOGGLE);
	}
	if (lcdBackLightStatus > 0)
	{
		backlightTimer++;
		if (backlightTimer >= onTimer)
		{
			backlightTimer = 0;
			lcdBackLightStatus = 0;
			LcdBackLight(LCD_BACKLIGHT_OFF);
		}
	}

}
Exemplo n.º 5
0
//****************************************************************************
// 							       ARDUINO SKETCH
//****************************************************************************
//We always have to include the library
#include "LedControlMS.h"

/*
 Now we need a LedControl to work with.
 ***** These pin numbers will probably not work with your hardware *****
 pin 12 is connected to the DataIn
 pin 11 is connected to the CLK
 pin 10 is connected to LOAD
 ***** Please set the number of devices you have *****
 But the maximum default of 8 MAX72XX wil also work.
 */
LedControl lc=LedControl(12,11,10,1);

/* we always wait a bit between updates of the display */
unsigned long delaytime=1000;

/*
 This time we have more than one device.
 But all of them have to be initialized
 individually.
 */
void setup()
{
	lc=LedControl(12,11,10,1);

	/*
     The MAX72XX is in power-saving mode on startup,