Test application for NUCLEO-F411RE Internal temperature sensor.

Dependencies:   TextLCD_improved mbed

Files at this revision

API Documentation at this revision

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

TextLCD.lib Show diff for this revision Revisions of this file
TextLCD_improved.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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
--- /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
--- 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);
     }
 }