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
Get step-by-step solutions from verified subject matter experts
