Question: Pressing the push-button generates a random dice number between 1 and 6 and displays on the LEDs for 3 seconds. After 3 seconds, the LEDs

Pressing the push-button generates a random dice number between 1 and 6 and displays on the LEDs for 3 seconds. After 3 seconds, the LEDs turn OFF again.

the bottom one is the code pls help me finish it

void main(void) { unsigned char j = 0; unsigned char pattern; // Define your dice array here initialize(); for (;;) { if (Switch == Pressed) { // You could also use: j = rand() % 6 + 1 j = number(6); // Get your dice pattern value from your DICE array and send // it to ports. } } }

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!