Let hard plastic get electrocuted !讓硬塑料被電吧!

Game

2011-2016

Alt text

Schematic

alt text

Game instruction

2 players in one game. Each player will have a push button on hand and one set of massage pad on face (or other body part)

When Player A pressed A’s button, this will connect the circuit to make therapy pulse attack to player B through the massage pad from the therapy massage machine. Player B can press the push button to cancel the circuit connection defense ,

and vice versa.

When Player B pressed B’s button, this will connect the circuit to make therapy pulse attack to player B through the massage pad from the therapy massage machine. Player A can press the push button to cancel the circuit connection defense , and vice versa.

** The circuit completion is done by electronic relay controlled by a micro processor. It is not identifical to an instant attack which the timing of pulse generation depended on the mode of massage therapy machine.

When both player A and player B pressed and hold the buttons for 3 seconds, both sets of massage pad circuit will be connected for 1 seconds.

When no one is pressing button for 5 seconds, both sets of massage pad circuit will be connected for 1 seconds.

After the preparation, turn on the digital therapy massage machine and select the mode and straightness of massage pulse to start the game.

No time limit for the game. The game stop until any one surrender. or please decide the winning condition before game start.

遊戲玩法

雙方各有一粒按扭,雙方臉部(或其他)地方貼上經絡治療器貼片。

當A君按下按扭,會接通B君上的電(攻擊),B君可按自己手上的按扭來關電(防守),如是者 當B君按下按扭,會接通A君臉上的電(攻擊),A君可按自己手上的按扭來關電(防守) **上面所講的接上電,其實只是用繼電器把供電貼片的電路接上,並不代表立即被電,是關取決於經絡治療器的模式(如按摩、搥擊、針灸、推拿等)。

當雙方同時按下維持三秒,將雙方的的貼片會同時供電一秒

當沒有任何按扭事件發生維持五秒,將雙方的的貼片會同時供電一秒

當雙方準備完畢,即可閞動經駱治療器,選擇按摩的模式及強度。

時限沒有,直到任何一方投降為止,或於開賽前想好一個分勝負的方法。


Code in Arduino IDE

int buttonAPin = 2; // Player A button connected to digital pin 2
int buttonBPin = 3; // Player B button connected to digital pin 3
int relayAPin = 13; // Relay A control pin connected to digital pin 13
int relayBPin = 12; // Relay B control pin connected to digital pin 12
int individualLedAPin = 9; // Individual LED for Player A connected to digital pin 9
int individualLedBPin = 8; // Individual LED for Player B connected to digital pin 8
int sharedLedPin = 5; // LED to indicate shared state connected to digital pin 5
bool isPlayerAPressing = false; // Flag to track if Player A's button is pressed
bool isPlayerBPressed = false; // Flag to track if Player B's button is pressed
unsigned long buttonReleaseTime = 0; // Time when both buttons were released
bool shouldAttack = false; // Flag to indicate if an attack should occur

void setup() {
    pinMode(buttonAPin, INPUT_PULLUP);
    pinMode(buttonBPin, INPUT_PULLUP);
    pinMode(relayAPin, OUTPUT);
    pinMode(relayBPin, OUTPUT);
    pinMode(individualLedAPin, OUTPUT);
    pinMode(individualLedBPin, OUTPUT);
    pinMode(sharedLedPin, OUTPUT);
}

void loop() {
    // Check if Player A button is pressed
    if (digitalRead(buttonAPin) == LOW && !isPlayerAPressing) {
        isPlayerAPressing = true;
        digitalWrite(individualLedAPin, HIGH); // Turn on Player A's individual LED
    } else if (digitalRead(buttonAPin) == HIGH && isPlayerAPressing) {
        // Player A released the button
        isPlayerAPressing = false;
        digitalWrite(individualLedAPin, LOW); // Turn off Player A's individual LED
        // Check if both buttons were released and no attack is currently happening
        if (!isPlayerBPressed && !shouldAttack) {
        buttonReleaseTime = millis(); // Record the button release time
        }
    }
    
    // Check if Player B button is pressed
    if (digitalRead(buttonBPin) == LOW && !isPlayerBPressed) {
        isPlayerBPressed = true;
        digitalWrite(individualLedBPin, HIGH); // Turn on Player B's individual LED
        } else if (digitalRead(buttonBPin) == HIGH && isPlayerBPressed) {
        // Player B released the button
        isPlayerBPressed = false;
        digitalWrite(individualLedBPin, LOW); // Turn off Player B's individual LED
        // Check if both buttons were released and no attack is currently happening
        if (!isPlayerAPressing && !shouldAttack) {
        buttonReleaseTime = millis(); // Record the button release time
        }
    }
    // Check if both buttons are released and no attack is currently happening
    if (!isPlayerAPressing && !isPlayerBPressed && !shouldAttack) {
        // Check if both buttons were released for at least 5 seconds
        if (millis() - buttonReleaseTime >= 5000) {
        shouldAttack = true; // An attack should occur
        digitalWrite(sharedLedPin, HIGH); // Turn on the shared LED
        }
    }

    // Perform the attack

    if (shouldAttack) {
        digitalWrite(relayAPin, HIGH);
        digitalWrite(relayBPin, HIGH);
        digitalWrite(sharedLedPin, HIGH); // Keep the shared LED on during the attack
        delay(1000); // Attack duration
        digitalWrite(relayAPin, LOW);
        digitalWrite(relayBPin, LOW);
        digitalWrite(sharedLedPin, LOW); // Turn off the shared LED after the attack
        shouldAttack = false; // Reset the attack flag
    }
}

Demo Play video (1st edition)

Demo Play video {讓硬塑料被電吧 大戰 } Open Battle – Let hard plastic get electrocuted

Let hard plastic get electrocuted !讓硬塑料被電吧! 大戰 } Open Battle -1 from wongchunhoi9 on Vimeo.

Exhibition view to show the documentation of game

Alt text

Alt text

Alt text