/* MRT Initialization and disable all timers */ Chip_MRT_Init(); for (mrtch = 0; mrtch < MRT_CHANNELS_NUM; mrtch++) { Chip_MRT_SetDisabled(Chip_MRT_GetRegPtr(mrtch)); } /* Enable the interrupt for the MRT */ NVIC_EnableIRQ(MRT_IRQn); delayMRTmicros(1000000); while ( 1 ) { for(i=0; i<20; i++) msj=0; strcpy(msj, "paso\r\n"); Chip_UART_SendBlocking(LPC_USART0, msj, sizeof(msj) - 1); /* measure! */ readDHT11(&measure); /* message ! */ for(i=0; i<20; i++) msj=0; itoa(measure.humidity, msj, 10); Chip_UART_SendBlocking(LPC_USART0, msj, sizeof(msj) - 1); Chip_UART_SendBlocking(LPC_USART0, "-hum\r\n", 6); for(i=0; i<20; i++) msj=0; itoa(measure.temperature, msj, 10); Chip_UART_SendBlocking(LPC_USART0, msj, sizeof(msj) - 1); Chip_UART_SendBlocking(LPC_USART0, "-temp\r\n", 7); /* Indicate entering power down state */ delayCount(2); Chip_PMU_PowerDownState(LPC_PMU); } |
Original Attachment has been moved to: dht11.c.zip
Original Attachment has been moved to: dht11.h.zip
Original Attachment has been moved to: redSensores.c.zip