Test application for NUCLEO-F411RE Internal temperature sensor.
Dependencies: TextLCD_improved mbed
Diff: main.cpp
- Revision:
- 4:be36f1d1babe
- Parent:
- 0:4127c73008a9
--- 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); } }