Question: Can you please modify the code to match the program? 0. Go to mbed site and log in using credentials created in previous labs. 1.

Can you please modify the code to match the program?

Can you please modify the code to match the program? 0. Go

0. Go to mbed site and log in using credentials created in previous labs. 1. Duplicate previous project 2. Modify the code to match the following program: include "mbed. h' include "BufferedSerial.h" include "Watchdog.h" #include define WAIT TIME MS 3000 DigitalOut led (LED1) ; 9 DigitalOut a (PA_6) ; 10 BufferedSerial serial_port (USBTX, USBRX, 9600) ; Ticker timers interrupt; 12 void init function (void) 13 // global variables 14 int led state = 2; timers_interrupt. attach (atimers, 100ma) ; 15 t. set baud(960 int old_led_state = 0 serial port. set bi 16 int timerl = 0; serial port.set_format ( 17 /* bits */ void control_led () 18 88 char line [50] ; /* parity ./ Bufferedserial: : None, /' stop bit ./ if (led_state == 0) 19 char buf [50] = (0); 90 led = 0; 20 char c; sprintf (line, "Press '0' to turn LEDI ON\\") ; 21 void init_function (void) ; serial port. write (line, 27) ; 92 if (led_state == 1) led = 1; 22 void control function (void) ; 53 sprintf (line, "Press turn LED OFF\\") ; 93 23 serial port.write (line, 27 else if (led_state == 2) void receive_commands (void) ; sprintf (line, "Pre "to blink LED \ ") 24 void control_led (void) ; 56 serial port. write (line, 27) ; 95 sprintf (line, "Pre o sleep/blink \ ") ; 96 flash_led () ; 25 void flash_led (void) ; serial_port.write (line, 2!) 97 else if (led_state == 3 26 void flash_led_sleeper (void) ; 58 // Configure the watchdog timer with a 5-second timeout 98 27 void send_status (void) ; Watchdog: :get_instance () . start (200 99 flash_led_sleeper () : 28 void timers (void) ; 29 void pet_dog (void) ; 101 id control_function (void) 30 102 void flash_led () 31 int main (void) 64 commands () : receive_com if (timerl

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 Programming Questions!