Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using FreeRTOS build the following system: The system should consist of three ta

ID: 3876392 • Letter: U

Question

Using FreeRTOS build the following system:
The system should consist of three tasks.

Keypad Task

When notified by an ISR that a key has been pressed this task should scan the keypad to find out what key has been pressed.
It should then pass on the ascii code of the key pressed to the Key Display Task.

Key Display Task

When keys are pressed on the keypad this task should display them on the LCD.
Once the screen is full this task should clear the screen and continue displaying the next pressed keys from position 0 again.
This process should happen continuously.  

Temperature task

Using the provided ADC library this task should display the temperature on the LCD if it changes by more than 1 degree C.
The LCD should be cleared before displaying the Temperature.
The Temperature should remain on the screen for 2 seconds.
The temperature sensor (lm35) should be polled every second.

Other Requirements:

The system should only react to a key press and not a release.
After displaying the temperature the LCD should go back to the key press display it had before as if nothing had happened.
If a key was pressed while the temperature was being displayed this should be captured and be on the display when the temperature finishes displaying.

HINT:

Investigate the use of an RTOS queue to send the key ascii code from the Keypad Task to the Key Display Task.

/// The ADC libraries

/*adc.h*/

/*adc.c*/

I know this is impossible to do without having the circuit and arduino. But at least give me something so I can finish it.

Explanation / Answer

void setup() {
  // make pin 2 an input and turn on the
  // pullup resistor so it goes high unless
  // connected to ground:
  pinMode(2, INPUT_PULLUP);
Keyboard.begin();
}

void loop() {
  //if the button is pressed
  if(digitalRead(2)==LOW){
  //Send an ASCII 'A',
Keyboard.write(65);
  }
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote