Giter Site home page Giter Site logo

knoblomat's Introduction

Knoblomat

The "Knoblomat" allows to play the simple game of "Rock - Paper - Scissors" agains a machine. Nine LEDs and three push puttons are used to display the user and machine choices and the values.

----------------------------------------------
|                                            |
|                                            |
|      O              O             O        |
|     LED7           LED8          LED9      |
|                                            |
|                                            |
|                                            |
|      O              O             O        |
|     LED4           LED5          LED6      |
|                                            |
|                                            |
|                                            |
|      O              O             O        |
|     LED1           LED2          LED3      |
|                                            |
|                                            |
|                                            |
|      O              O             O        |
|   BUTTON1        BUTTON2       BUTTON3     |
|                                            |
|                                            |
----------------------------------------------

The LEDs indicate the user selection (push buttons) as follows:

LED1     Rock     (user selection)
LED2     Scissors (user selection)
LED3     Paper    (user selection)

LED4     Rock     (machine selection)
LED5     Scissors (machine selection)
LED6     Paper    (machine selection)

LED7     Winning  (user won, machine lost)
LED8     Tied     (no winner)
LED9     Loosing  (user lost, machine won)

The push buttons are used to select the users choice.

SWITCH1  Rock     (reset)
SWITCH2  Scissors (reset)
SWITCH3  Paper    (reset)

After startup the system is in the STARTUP state and three rows of LEDs are turned on, and the system goes to the WAITING state. The game is played by pushing a button (users choice) three times switching the system state in the following order:

Click 1 => INIT     (all user LEDs are turned on)
Click 2 => READY    (all machine LEDs are turned on)
Click 3 => DONE     (the selections and values are displayed)
Click 4 => WAITING  (all LEDs are turned off)

Note that the third click determines the outcome of the game (user selection). After 15 seconds inactivity (no button is pushed) the system state is reset to the WAITING state.

Hardware

A single ESP32 - a small, complete, and breadboard-friendly board using the ESP-WROOM-32 module. It is based on the ESP32 microcontroller that boasts Wifi, Bluetooth, Ethernet and Low Power support all in a single chip.

Specifications

Technical Specifications
Microcontroller Dual-core CPU Xtensa LX6
Operating Voltage 3.3V
Input Voltage 7-12V
Digital I/O Pins (DIO) 25
Analog Input Pins (ADC) 6
Analog Outputs Pins (DAC) 2
UARTs 3
SPIs 2
I2Cs 3
Flash Memory 4 MB
RTC SRAM 16 KB
SRAM 520 KB
ROM 448 KB
Clock Speed 240 Mhz
Wi-Fi IEEE 802.11 b/g/n/e/i
PWM Output 16
Power Consumption 80 mA
PCB Size (L x W x H) 5 x 3.7 x 1.2cm
Weight 13 g

Software

An Arduino compatible project implements all the code running on the board. A async web server is used to provide a web based interface to the application. The actual user interface is implemented using Bootstrap, jQuery and Javascript.

knoblomat's People

Contributors

dtv42 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.