3x3games# - github · simon says game. so i tried to understand his sketch and then tried to...

4
3x3 Games Project: Author: Robert Polzer Ideas: My family gave me the ideas and time to make this project happen! About 28 years ago I got my first computer - a Commodore C64. So I played many games, but also tried to program in Basic and small routines (ok - very small routines) in Assembler. Then at work I wrote little scripts in VBA for Excel and Access. Then, after years without programming, I tried the Arduino-Uno and fell in love. My first sketches were LED-effects and examples. Then I found some Arduino-TicTacToe projects, but none of them were attractive to me. So I tried to find my own solution, and here is the result! During programming I had the idea to add sound and speech-output, so I expanded my hardware with the Sparkfun mp3-Trigger and an amplifier. Lights Out: Ideas: This was my first sketch for my “3x3-Game” hardware. The idea was, to write a small program, and use 9 keys and 9 led’s on a breadboard for user in-/output. But gradually I wanted more. So I bought big arcade-buttons and RGB-leds and expanded the sketch. Manual: When the game starts, a random number of these lights are switched on. Pressing any of the lights will toggle it and the four adjacent lights. The goal of the puzzle is to switch all the lights off.

Upload: others

Post on 31-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 3x3Games# - GitHub · Simon Says game. So I tried to understand his sketch and then tried to program my version on my own. • Manual: A round in the game consists of the device lighting

3x3  Games  

Project:   Author: Robert Polzer Ideas: My family gave me the ideas and time to make this project happen! About 28 years ago I got my first computer - a Commodore C64. So I played many games, but also tried to program in Basic and small routines (ok - very small routines) in Assembler. Then at work I wrote little scripts in VBA for Excel and Access. Then, after years without programming, I tried the Arduino-Uno and fell in love. My first sketches were LED-effects and examples. Then I found some Arduino-TicTacToe projects, but none of them were attractive to me. So I tried to find my own solution, and here is the result! During programming I had the idea to add sound and speech-output, so I expanded my hardware with the Sparkfun mp3-Trigger and an amplifier.

Lights  Out:  

• Ideas: This was my first sketch for my “3x3-Game” hardware. The idea was, to write a small program, and use 9 keys and 9 led’s on a breadboard for user in-/output. But gradually I wanted more. So I bought big arcade-buttons and RGB-leds and expanded the sketch.

• Manual:

When the game starts, a random number of these lights are switched on. Pressing any of the lights will toggle it and the four adjacent lights. The goal of the puzzle is to switch all the lights off.

 

Page 2: 3x3Games# - GitHub · Simon Says game. So I tried to understand his sketch and then tried to program my version on my own. • Manual: A round in the game consists of the device lighting

Simon:  

• Ideas and problem-solving approach: a_guadalupi (http://scuola.arduino.cc/profile/a_guadalupi) http://scuola.arduino.cc/courses/lessons/cover/DWzMEJ8 Then I searched for new ideas for my 3x3-hardware. And I found a cool version of the Simon Says game. So I tried to understand his sketch and then tried to program my version on my own.

• Manual: A round in the game consists of the device lighting up one or more buttons in a random order, after which the player must reproduce that order by pressing the buttons. As the game progresses, the number of buttons to be pressed increases. After starting the game, you can choose if you play with 4 or 8 buttons. To select the difficulty you have to press the unlit buttons and confirm with the white button in the middle. Then the computer will generate a sequence with 100 steps and begins to show you the first move. Then you have to reproduce that. When you are right, the computer will show you 2 steps and so on, till you make a mistake or reproduce all 100 steps in correct order.

Tic  Tac  Toe:  

• Ideas and problem-solving approach: Rahul Kar http://www.engineersgarage.com/contribution/digital-tic-tac-toe-game-circuit-diagram I took the code for computer and player-move from Rahul Kar, and wrote the in- and output code completely new for my hardware.

• Manual:

When you start the game, the computer makes the first move (red) and chooses a random spot. Then the player has to make his first move (blue). Then the computer makes its best move and so on, till one player has 3 spots in a row. After the confirmation the start-player will switchover.

Page 3: 3x3Games# - GitHub · Simon Says game. So I tried to understand his sketch and then tried to program my version on my own. • Manual: A round in the game consists of the device lighting

weiß (Pin 7)

grün (Pin 8)

grau (Pin 9)

brau

n (P

in 1

2)

oran

ge (P

in 1

1)

viol

ett (

Pin

10)

T1 T2 T3

T4 T5 T6

T9T8T7

Beschaltung des Tastenfeldes(Ansicht von der Unterseite)

LED 0 LED 1 LED 2 LED 8

gelb (Pin 3)

Din Dout Din Dout Din Dout Din

5V 5V 5V 5V

Page 4: 3x3Games# - GitHub · Simon Says game. So I tried to understand his sketch and then tried to program my version on my own. • Manual: A round in the game consists of the device lighting

29.06.14 18:38 /Volumes/daten/Entwicklung/Projekte - eigene/3x3-Games/Eagle-Files/3x3_Games.sch (Sheet: 1/1)

weissgrüngrauviolettorangebraun

gelb

GND GND GND

GND GND GND

GND GND GND

GND

+5V +5V+5V

+5V +5V +5V

+5V +5V +5V

+5V

GND

4-DIN 2-DOUT

1-VD

D3-

GN

D

LED04-DIN 2-DOUT

1-VD

D3-

GN

DLED1

4-DIN 2-DOUT

1-VD

D3-

GN

D

LED2

4-DIN 2-DOUT

1-VD

D3-

GN

D

LED34-DIN 2-DOUT

1-VD

D3-

GN

D

LED44-DIN 2-DOUT

1-VD

D3-

GN

D

LED5

4-DIN 2-DOUT

1-VD

D3-

GN

D

LED64-DIN 2-DOUT

1-VD

D3-

GN

D

LED7

D12D11D10

D9D8D7D6D5D4D3D2

GNDRST

RXTX

+5VRST.GND.

A5A4A3A2A1A0

NC.NC

REF3V3D13

<USB

>GN

D

<USB

>D-

<USB

>D+

<USB

>+V

VINSS

MOSIMISOSCK

<USB

>ID

12

S1

12

S2

12

S3

12

S4

12

S5

12

S6

12

S7

12

S8

12

S9

4-DIN 2-DOUT

1-VD

D3-

GN

D

LED8

ARD

UIN

O

ICSP

MIC

RO