Go Down

Topic: MasterMind - RotaryDial (Read 1 time) previous topic - next topic


Apr 07, 2014, 11:21 am Last Edit: Apr 07, 2014, 09:56 pm by Msquare Reason: 1
A slightly weird idea. Here I had an old telephone rotary dial, and had worked out how to "read" the dialling, with some simple Arduino code (10 lines).  Now what to use it for? The un-original idea: "guess a number". 1,2 or 4 digits by simple binary search and a LED to show Hi/Low. And then I thought of Mastermind where you guess 4 colours, and get a clue about right number right/wrong place.

Thus this little gadget

It plays both the simple Hi/low guess and MasterMind (with different degrees of difficulty) The front picture shows one Green and one Red Led - they are two colour LEDs - so my last attempt got one digit all correct, and one digit in the wrong place and the other two way off.

Code is in attached file


Inspiring tinkering!

Do you have pictures of people gazing at you when you play with this device in a bus or train :)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Edit done to top post - added a bit about two-colour LEDs

@robtillaart: no, not yet. ;)


Found a bug and some needed improvements
1: Choosing game 5 and 7 now correctly has correct digit range
2: Show all green LEDs after win for 5 seconds,
3: Start a new game of same type after 10 seconds after win
4: removed the timeout if users pause for too long

Go Up