Solving Approach

How do you plan to solve it?

#define button_pin 

volatile uint8_t button

void setup(){

pinmode(MISO, INPUT_PULLUP);

pinmode(button_pin, INUPUT_PULLUP);

spi.attachinterrupt();

serial.begin(9600);

serial.printIn("Click the button to roll the dice: ")'

}

ISR_MASTER(vector_add){

button = digitalread(button_pin);

if(button_pin == HIGH){

serial.printIn("Rolled a ");

serial.printIn(SPDR);

serial.printIn("!);

}

}

void loop(){

}

 

 

 

Code

/*Paste your code here*/#define button_pin 

volatile uint8_t button

void setup(){

pinmode(MISO, INPUT_PULLUP);

pinmode(button_pin, INUPUT_PULLUP);

spi.attachinterrupt();

serial.begin(9600);

serial.printIn("Click the button to roll the dice: ")'

}

ISR_MASTER(vector_add){

button = digitalread(button_pin);

if(button_pin == HIGH){

serial.printIn("Rolled a ");

serial.printIn(SPDR);

serial.printIn("!);

}

}

void loop(){

}

 

Output

Video

Add a video of the output (know more)

 

 

 

 

 

Photo of Output

Add a photo of your hardware showing the output.

 

 

 

 

Screenshot of Serial Terminal 

Add a Screenshot of the serial terminal showing the output.


 

Upvote
Downvote

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!