Seven segment display always throw 6

hey guys can someone help me with making a code of the seven segment display

if i press 2 buttons it has to throw always the number 6

the 2 buttons that i need to use

pinMode ( buttondice and buttonresett, INPUT)

see the attachment

sketch_jun19a.ino (1.48 KB)

So i delete that then.
But i still dont know how to throw 6 all the time if i want ( like a cheat button)
and i have the buttondice and the buttonresett but i just dont know how to program that when i press the 2 buttons at the sametime i always throw 6

p.s.

sorry for my bad english
its a digital dice

sketch_jun23b.ino (1.38 KB)

the code is not mine.... i copied it because i just suck at making codes but the dice work.

but the teacher said that i need to program something with the buttons i already have . so that would be the cheat mode to throw always six but just dont now or where to start

this is the last thing i need to do and the n i m done with arduino. FINALLY

but i will find someone els that will help me

Makes sense that the project is about cheating.

Last semester our engineering classes had an unusually enormous amount of cheating - they got very elaborate. I think there were 18 Fs given in one single class. They went to the dean to complain and got expelled.

I don't get it either. I guess it's the lure of easy money.

TomLeeuwenborgh:
So i delete that then.
But i still dont know how to throw 6 all the time if i want ( like a cheat button)
and i have the buttondice and the buttonresett but i just dont know how to program that when i press the 2 buttons at the sametime i always throw 6

p.s.

sorry for my bad english
its a digital dice

At any given time, your sketch is in one of four "states":

  • the display is clear (CLEAR)
  • rolling the die, (ROLLING)
  • rolling, but when the roll button is released then a '6' must be displayed. (CHEATING)
  • displaying a result, (DISPLAY)

In each of these states, there i the following behaviour on each loop()

CLEAR:
if the dice button is down, then enter ROLLING mode

ROLLING:
if the reset button is down, then enter CHEATING mode
if the dice button is down, randomly choose a new dice value and update the display
otherwise, enter display mode.

CHEATING:
if the dice button is down, randomly choose a new dice value and update the display
otherwise, set the dice value to 6, update the display, and enter display mode

DISPLAY:
if the reset button is 0, clear the display and enter CLEAR mode