Simple test program to get familiar with functionality of MBED RTOS on ST Nucleo-F411RE. Tasks for LED blinking, user button, temperature measurement with DS1620, temperature measurement with internal temperature sensor of ST32F411RE, ultrasonic distance measurement and displaying result on 16x2 TextLCD.

Dependencies:   DS1620_improved TextLCD_improved mbed-rtos mbed

Committer:
dzoni
Date:
Mon Dec 14 11:32:15 2015 +0000
Revision:
9:645f0e517017
Child:
11:e89f89c0920b
Tasks split into separate source files. Compile OK. For testing.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dzoni 9:645f0e517017 1 #include "mbed.h"
dzoni 9:645f0e517017 2 #include "rtos.h"
dzoni 9:645f0e517017 3
dzoni 9:645f0e517017 4 #include "tsk_button.h"
dzoni 9:645f0e517017 5 #include "tsk_display.h"
dzoni 9:645f0e517017 6 #include "tsk_dist.h"
dzoni 9:645f0e517017 7 #include "tsk_led.h"
dzoni 9:645f0e517017 8 #include "tsk_temp.h"
dzoni 9:645f0e517017 9
dzoni 9:645f0e517017 10 uint32_t uiCnt = 0;
dzoni 9:645f0e517017 11
dzoni 9:645f0e517017 12 int main() {
dzoni 9:645f0e517017 13
dzoni 9:645f0e517017 14 Thread::wait(1000);
dzoni 9:645f0e517017 15
dzoni 9:645f0e517017 16 initDS1620Temp();
dzoni 9:645f0e517017 17
dzoni 9:645f0e517017 18 Thread dispThread(disp_thread, NULL, osPriorityLow);
dzoni 9:645f0e517017 19 Thread tempThread(temp_thread, NULL, osPriorityLow);
dzoni 9:645f0e517017 20 Thread distThread(dist_thread, NULL, osPriorityRealtime);
dzoni 9:645f0e517017 21 Thread led2Thread(led2_thread, NULL, osPriorityNormal);
dzoni 9:645f0e517017 22 Thread ubuttonThread(ubutton_thread, NULL, osPriorityAboveNormal);
dzoni 9:645f0e517017 23
dzoni 9:645f0e517017 24 Thread::wait(osWaitForever);
dzoni 9:645f0e517017 25 }
dzoni 9:645f0e517017 26