Question: Programming in C: How to code this: Task 4 - Using GhGetRandom and GhDelay Our project this term is to develop software to run the

Programming in C:

How to code this:

Programming in C: How to code this: Task 4 - Using GhGetRandom

Task 4 - Using GhGetRandom and GhDelay Our project this term is to develop software to run the environmental controls for a greenhouse. Most real-time programs start with an initialization section which is followed by and endless loop of repeated tasks that use random numbers and finally a delay at the end of this loop. When using random number generation you must initialize the random number generator with a random number before the rando) function is first used. This is done by calling another standard library function called stand. A standard techniqueis to pass it a number representing the current time, which always varies. Start by checking fro the symbolic constant called GHUPDATE with a value of 2000 in ghch: #define GHUPDATE 2000 Then write the function GhController Init within lab03.c. 1. This function calls the stand function with the argument (unsigned) time(NULL). srand((unsigned) time(NULL)); 2. and also calls GhDisplay Header 3. and GhGetSerial: fprintf(stdout, "Unit: %LX ",GhGeSerial(); Task 4 - Using GhGetRandom and GhDelay Our project this term is to develop software to run the environmental controls for a greenhouse. Most real-time programs start with an initialization section which is followed by and endless loop of repeated tasks that use random numbers and finally a delay at the end of this loop. When using random number generation you must initialize the random number generator with a random number before the rando) function is first used. This is done by calling another standard library function called stand. A standard techniqueis to pass it a number representing the current time, which always varies. Start by checking fro the symbolic constant called GHUPDATE with a value of 2000 in ghch: #define GHUPDATE 2000 Then write the function GhController Init within lab03.c. 1. This function calls the stand function with the argument (unsigned) time(NULL). srand((unsigned) time(NULL)); 2. and also calls GhDisplay Header 3. and GhGetSerial: fprintf(stdout, "Unit: %LX ",GhGeSerial()

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!