Test application for NUCLEO-F411RE Internal temperature sensor.
Dependencies: TextLCD_improved mbed
Revision 4:be36f1d1babe, committed 2015-12-16
- Comitter:
- dzoni
- Date:
- Wed Dec 16 23:07:42 2015 +0000
- Parent:
- 3:1be26016c02e
- Commit message:
- Test application for NUCLEO-F411RE internal temperature sensor.
Changed in this revision
diff -r 1be26016c02e -r be36f1d1babe TextLCD.lib --- a/TextLCD.lib Sat Dec 12 20:23:47 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://developer.mbed.org/users/simon/code/TextLCD/#43c7f34925ac
diff -r 1be26016c02e -r be36f1d1babe TextLCD_improved.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD_improved.lib Wed Dec 16 23:07:42 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/dzoni/code/TextLCD_improved/#43c7f34925ac
diff -r 1be26016c02e -r be36f1d1babe main.cpp --- a/main.cpp Sat Dec 12 20:23:47 2015 +0000 +++ b/main.cpp Wed Dec 16 23:07:42 2015 +0000 @@ -84,11 +84,11 @@ //enable ADC1 clock SET_BIT(RCC->APB2ENR, RCC_APB2ENR_ADC1EN); - // Zapnout ADC + // ADC on SET_BIT(ADC1->CR2, ADC_CR2_ADON); CLEAR_BIT(ADC1->CR2, ADC_CR2_CONT); - // Zapnout Temp sensor + // Temp sensor on CLEAR_BIT(ADC->CCR, ADC_CCR_VBATE); SET_BIT(ADC->CCR, ADC_CCR_TSVREFE); @@ -133,10 +133,10 @@ temp /= (float)bufferSize; lcd.cls(); - lcd.printf("Teplota: % 4u s", uiCnt); + lcd.printf("Time: % 4u s", uiCnt); uiCnt += 1; lcd.locate(0, 1); - lcd.printf("% 3.1f%cC", temp, 0xdf); + lcd.printf("Temp: % 3.1f%cC", temp, 0xdf); wait_us(1000000); } }