Go Down

Topic: Project for school (Read 18 times) previous topic - next topic

TomLeeuwenborgh

Hey guys,

so I need help with my project for school. We are using Arduino now for 5 weeks or so. So I still don't fully understand the codes and how I need to program it.

Now we need to make a digital dice like this one (https://circuitdigest.com/microcontroller-projects/digital-dice-using-arduino ). We just used the code that they also used. (see Attachments)

But now the teacher said to us that we need to program a cheat button. What does he mean with that? He means that we need to use 1 of the 2 buttons that we installed on the de breadboard. And we need to hold 1 of the 2 buttons for a couple of seconds , so he will always trow 6

I hope someone can help me

p.s

sorry for my bad Englisch i m Dutch

6v6gt

Divide the problem into two parts:

1. setting cheat mode
2. altering the displayed result, so in cheat mode it is always 6.

You can simulate cheat mode by hard coding a boolean variable

Code: [Select]
bool cheatMode = true ;

Then get the display part working. After that, program the buttons to set cheat mode.

Go Up