Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions