Question: An Arduino-based microcontroller is used to: control two LEDs that are connected to port D10, and D11; measure temperature data by using temperature sensor LM35

An Arduino-based microcontroller is used to:

control two LEDs that are connected to port D10, and D11;

measure temperature data by using temperature sensor LM35 that is connected to port A1;

display the temperature reading on Serial Monitor.

The connection of LEDs is based on sourcing mode where logic 1 on the port will turn ON the LEDs. Table Q4(b) shows the time constraint for each of the task, where:

LED1 and LED2 blink at the interval of 1000ms and 1500ms, respectively;

and temperature sensor data will be read and displayed for every 500ms.

Based on the abovementioned condition and by assigning appropriate priority level for each task,

(i) Propose a flowchart for the required multitasking system by implementing multiple threads in Real Time Operating System (RTOS). (7 marks)

(ii) Design a complete C++ language code to handle the whole operation by using ChibiOS RTOS platform. (13 marks)

An Arduino-based microcontroller is used to: control two LEDs that are connected

Task 1 2 3 Description LEDI LED2 TEMP Table Q4(b) Time constraint (ms) 1000 1500 500 Arduino Pin D10 D11 A1 Task 1 2 3 Description LEDI LED2 TEMP Table Q4(b) Time constraint (ms) 1000 1500 500 Arduino Pin D10 D11 A1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!