Schere ✌️, Stein ✊, Papier 🖐️ – kaum ein anderes Spiel ist so bekannt und wird weltweit in so vielen Situationen gespielt. Ob auf dem Schulhof, beim Sport , im Büro oder einfach zwischendurch mit Freunden. Das einfache Handspiel entscheidet oft schnell und fair, wer den nächsten Zug machen darf, wer anfängt oder einfach wer das Spiel gewonnen hat.
Regeln und Ablauf für Schere ✌️, Stein ✊, Papier 🖐️
- Spieleranzahl
- Meistens spielen 2 Personen gegeneinander.
- Ablauf
- Wenn beide rot/blau Spieler gleichzeit auf einen der 3 Taster gedrückt haben wird auf den NEOPixel angeziegt was jeder ausgewählt hat 🎉“
- Bei wem es grün lkeuchtet hat gewonnen ✋.
- Regeln der Entscheidung
- ✌️ Schere schneidet 🖐️ Papier → ✌️ gewinnt 🏆
- 🖐️ Papier bedeckt ✊ Stein → 🖐️ gewinnt 🥇
- ✊ Stein zerquetscht ✌️ Schere → ✊ gewinnt 🥳
- Unentschieden
- Zeigen beide dieselbe Figur → Unentschieden → nochmal spielen 🔄
⚙️ Aufbau / Schaltung
- Taster anschließen
- Jeder Spieler hat 3 Taster:
- Taster 1 = ✌️ Schere
- Taster 2 = ✊ Stein
- Taster 3 = 🖐️ Papier
- Taster mit den analogen PINs A0 und A1 verbinden.
- Neopixel und Spannung 5V und GND verbinden, Kommunikation digitalen PIN 9
- Noepixel brauchen ggf. extra Spannung an VCC und GND
- Jeder Spieler hat 3 Taster:
- Optional Summer, für Spielende
🤟Vorlage Schere/Stein/Papier zum ausdrucken
⌨️ Arduino Code
#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel strip_pin9 = Adafruit_NeoPixel(400,9, NEO_GRB + NEO_KHZ800);
int rechts = 8;
int links = 232;
void Unterprogramm3();
void Unterprogramm1();
void Unterprogramm2();
void setup() {
strip_pin9.begin();
strip_pin9.show();
Serial.begin(9600);
rechts = 8;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(rechts,0 ,0 ,10 );
rechts = ( rechts + 1 );
}
links = 232;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(links,10 ,0 ,0 );
links = ( links + 1 );
}
strip_pin9.show();
links = 0;
rechts = 0;
}
void loop() {
Unterprogramm1();
Unterprogramm2();
Unterprogramm3();
}
//auswertung
void Unterprogramm3() {
if (( ( rechts > 500 ) && ( links > 500 ) )) {
if (( rechts == links )) {
rechts = 24;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(rechts,0 ,20 ,0 );
rechts = ( rechts + 1 );
}
links = 216;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(links,0 ,20 ,0 );
links = ( links + 1 );
}
}
if (( ( rechts == 600 ) && ( links == 800 ) )) {
rechts = 24;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(rechts,0 ,20 ,0 );
rechts = ( rechts + 1 );
}
}
if (( ( rechts == 800 ) && ( links == 600 ) )) {
links = 216;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(links,0 ,20 ,0 );
links = ( links + 1 );
}
}
if (( ( rechts == 600 ) && ( links == 700 ) )) {
links = 216;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(links,0 ,20 ,0 );
links = ( links + 1 );
}
}
if (( ( rechts == 700 ) && ( links == 600 ) )) {
rechts = 24;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(rechts,0 ,20 ,0 );
rechts = ( rechts + 1 );
}
}
if (( ( rechts == 800 ) && ( links == 700 ) )) {
rechts = 24;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(rechts,0 ,20 ,0 );
rechts = ( rechts + 1 );
}
}
if (( ( rechts == 700 ) && ( links == 800 ) )) {
links = 216;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(links,0 ,20 ,0 );
links = ( links + 1 );
}
}
strip_pin9.show();
delay( 2000 );
links = 10000;
rechts = 0;
while ( ( links == 10000 ) ) {
Serial.print("1 ");
Serial.println();
while ( ( ( analogRead(0) > 180 ) && ( analogRead(1) > 180 ) ) ) {
Serial.print("2 ");
Serial.println();
if (( ( analogRead(0) > 180 ) && ( analogRead(1) > 180 ) )) {
for (int i = 0; i < 300; i++) {
strip_pin9.setPixelColor(links,0 ,0 ,0 );
links = ( links + 1 );
}
strip_pin9.show();
delay( 1000 );
rechts = 8;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(rechts,0 ,0 ,10 );
rechts = ( rechts + 1 );
}
links = 232;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(links,10 ,0 ,0 );
links = ( links + 1 );
}
strip_pin9.show();
links = 0;
rechts = 0;
}
}
}
}
}
//spieler links
void Unterprogramm1() {
if (( ( analogRead(1) > 50 ) && ( ( links < 500 ) && ( ( analogRead(0) > 180 ) && ( analogRead(0) < 220 ) ) ) )) {
links = 48;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(links,0 ,0 ,20 );
links = ( links + 1 );
}
strip_pin9.show();
links = 600;
}
if (( ( analogRead(1) > 50 ) && ( ( links < 500 ) && ( ( analogRead(0) > 380 ) && ( analogRead(0) < 420 ) ) ) )) {
links = 96;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(links,0 ,0 ,20 );
links = ( links + 1 );
}
strip_pin9.show();
links = 700;
}
if (( ( analogRead(1) > 50 ) && ( ( links < 500 ) && ( ( analogRead(0) > 580 ) && ( analogRead(0) < 620 ) ) ) )) {
links = 144;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(links,0 ,0 ,20 );
links = ( links + 1 );
}
strip_pin9.show();
links = 800;
}
}
//spieler rechts
void Unterprogramm2() {
if (( ( analogRead(0) > 50 ) && ( ( rechts < 500 ) && ( ( analogRead(1) > 180 ) && ( analogRead(1) < 220 ) ) ) )) {
rechts = 64;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(rechts,20 ,0 ,0 );
rechts = ( rechts + 1 );
}
strip_pin9.show();
rechts = 600;
}
if (( ( analogRead(0) > 50 ) && ( ( rechts < 500 ) && ( ( analogRead(1) > 380 ) && ( analogRead(1) < 420 ) ) ) )) {
rechts = 112;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(rechts,20 ,0 ,0 );
rechts = ( rechts + 1 );
}
strip_pin9.show();
rechts = 700;
}
if (( ( analogRead(0) > 50 ) && ( ( rechts < 500 ) && ( ( analogRead(1) > 580 ) && ( analogRead(1) < 620 ) ) ) )) {
rechts = 160;
for (int i = 0; i < 16; i++) {
strip_pin9.setPixelColor(rechts,20 ,0 ,0 );
rechts = ( rechts + 1 );
}
strip_pin9.show();
rechts = 800;
}
}