77,8 → 77,8 |
|
UART1_Init(); // Initialize the UART handler code |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
116,8 → 116,8 |
|
I2C_Configure_Master(I2C_100KHZ); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
183,8 → 183,8 |
|
I2C_Configure_Slave(0x24); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
232,8 → 232,8 |
|
I2C_Configure_Master(I2C_400KHZ); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
373,8 → 373,8 |
|
I2C_Configure_Master(I2C_400KHZ); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
425,8 → 425,8 |
UART1_Init(); // Initialize the UART handler code |
SPI2_Init(SPI2_FOSC_8); // Initialize the SPI module |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
470,8 → 470,8 |
SPI2_Init(SPI2_FOSC_4); // Initialize the SPI module |
SSD1306_Init(); // Initialize the OLED code |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
586,8 → 586,8 |
SPI2_Init(SPI2_FOSC_64); // Initialize the SPI module |
SSD1331_Init(); // Initialize the OLED code |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
720,8 → 720,8 |
// I2C_Configure_Master(I2C_400KHZ); |
SSD1306_Begin(SSD1306_SWITCHCAPVCC); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
779,8 → 779,8 |
UART1_Init(); // Initialize the UART handler code |
XBee_Init(); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
939,8 → 939,8 |
|
I2C_Configure_Master(I2C_400KHZ); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
DBG_PRINT_MAIN("\r\nBegin Program\r\n"); |
|
1025,8 → 1025,8 |
|
Timer1_Init(); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
LED_BLUE_TRIS = 0; |
LED_RED_TRIS = 0; |
1059,8 → 1059,8 |
|
I2C_Configure_Master(I2C_100KHZ); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
LUX_Begin(); |
|
1108,8 → 1108,8 |
// UART1_Init(); |
NHD_Init(); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
NHD_Begin(16, 2); |
|
1142,8 → 1142,8 |
|
I2C_Configure_Master(I2C_100KHZ); |
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
BMP_Begin(BMP085_ULTRAHIGHRES); |
|
1186,8 → 1186,8 |
I2C_Configure_Master(I2C_400KHZ); |
|
|
interrupt_enable(); // Enable high-priority interrupts and low-priority interrupts |
interrupt_init(); // Initialize the interrupt priorities |
Interrupt_Enable(); // Enable high-priority interrupts and low-priority interrupts |
Interrupt_Init(); // Initialize the interrupt priorities |
|
NHD_Begin(16, 2); |
|
1198,14 → 1198,13 |
// Changing the integration time gives you a longer time over which to sense light |
// longer timelines are slower, but are good in very low light situtations! |
LUX_SetTiming(TSL2561_INTEGRATIONTIME_13MS); // shortest integration time (bright light) |
// LUX_SetTiming(TSL2561_INTEGRATIONTIME_101MS); // medium integration time (medium light) |
// LUX_SetTiming(TSL2561_INTEGRATIONTIME_402MS); // longest integration time (dim light) |
// LUX_SetTiming(TSL2561_INTEGRATIONTIME_101MS); // medium integration time (medium light) |
// LUX_SetTiming(TSL2561_INTEGRATIONTIME_402MS); // longest integration time (dim light) |
|
while (1) { |
lum = LUX_GetFullLuminosity(); |
ir = lum >> 16; |
full = lum & 0xFFFF; |
// NHD_Clear(); |
NHD_Set_Cursor(0, 0); |
NHD_Write_String("I: %d ", ir); |
NHD_Write_String("V: %d ", full - ir); |