Question: Write a C program clock that continuously reads lines from stdin and displays them as described above on the LED array. Lines will be of

Write a C program clock that continuously reads lines from stdin and displays them as described above on the LED array. Lines will be of the form HH:MM:SSHH will range from 0-23, MM and SS will range from 0-59, and the separating :: are mandatory. The program must be built from the following files:

  1. (30 points) display.c : Should have at least the following functions:
    1. void display_time(int hours, int minutes, int seconds, pi_framebuffer_t *dev) : displays the time on device dev using the below helpers.
    2. void display_colons(pi_framebuffer_t *dev) : draws the colons
    3. void display_hours(int hours, pi_framebuffer_t *dev) : displays the hours on device dev as above
    4. void display_minutes(int minutes, pi_framebuffer_t *dev) : displays the minutes on device dev as above
    5. void display_seconds(int seconds, pi_framebuffer_t *dev) : displays the seconds on device dev as above

Step by Step Solution

3.48 Rating (141 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

c include include include include displayh define MAXLINELENGTH 9 int main char li... View full answer

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 Computer Network Questions!