lundi 12 octobre 2020

Arduino Random Number Guessing Game

I've been working on a program for the past week for one of my Computer Tech class. Our goal is to make a random guessing game which should be programmed into our Arduino Nano and then put onto a breadboard with a Circuit that connects to 8 LED's. Every time the user guesses too high, the program should print out "too high. Guess again" with the LED's going from pin 12-2, and vise versa for if the user guesses too low. Once the user guesses correctly, there should be a victory message which I haven't written yet but that's fine it's not hard to do. For the most part, the program seems to be working just fine, however if the user were to guess the number wrong, the program would completely reset and create another random number. Is there anyway I could make it so that my number stays the same until the user guesses correctly?




Aucun commentaire:

Enregistrer un commentaire