Example Code for Arduino-Ice Breaking Game
Last revision 2025/12/26
In this section, we'll introduce a game named "Ice-Breaking". In this game, All participants needs to hold another people's hands until the LED ON.
The earth can also act as a conductor. That is, when the resistance between A, B and the earth is not large enough, the conductivity will occur. A and B both need to have their feet off the ground.**
Hardware Preparation
- DFRduino UNO x 1
- Conductivity Switch Sensor x1
- M-M/F-M/F-F Jumper wires
Software Preparation
- Arduino IDE, Click to Download Arduino IDE from Arduino
Wiring Diagram
Sample Code
/*!
* @file conductivitySwitchSensor.ino
* @brief This example Test there is no connection between the poles.
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @license The MIT License (MIT)
* @author linfeng([email protected])
* @version V1.0
* @date 2016-6-21
*/
int ledPin = 13;
int inputPin = 4;
void setup() {
Serial.begin(9600);
pinMode(ledPin,OUTPUT);
pinMode(inputPin,INPUT);
digitalWrite(ledPin,HIGH);
delay(2000);
}
void loop() {
int pinValue=digitalRead(inputPin);
if(pinValue==HIGH){
digitalWrite(ledPin,HIGH);
} else{
digitalWrite(ledPin,LOW);
}
delay(100);
}
Result
LED 13 will be light on, if you hold the others hands.
In the game section, you can replace led with relay to control light, pump or other actuator. ALSO, you can replace yourself with banana, apple, orange to make interesting project.
Was this article helpful?
