aboutsummaryrefslogtreecommitdiff
path: root/libraries/Esplora/Experts/EsploraPong/EsploraPong.ino
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-08-23 15:59:24 +0200
committerCristian Maglie <c.maglie@bug.st>2013-08-23 15:59:24 +0200
commit540743129b2badb813b703208d121ff14553c147 (patch)
tree6fadb4ebce68e1f0cb298a282be135c23fd156ed /libraries/Esplora/Experts/EsploraPong/EsploraPong.ino
parent073b3ac9d4ae93ac0bb3a91afc65ae9d8f1d5d59 (diff)
parent67c84855c2f3ce99b091a756bb2ca1a016260659 (diff)
Merge branch 'ide-1.5.x' into dev-ide-1.5.x-discovery
Conflicts: app/src/processing/app/Preferences.java app/src/processing/app/debug/Uploader.java
Diffstat (limited to 'libraries/Esplora/Experts/EsploraPong/EsploraPong.ino')
-rw-r--r--libraries/Esplora/Experts/EsploraPong/EsploraPong.ino44
1 files changed, 0 insertions, 44 deletions
diff --git a/libraries/Esplora/Experts/EsploraPong/EsploraPong.ino b/libraries/Esplora/Experts/EsploraPong/EsploraPong.ino
deleted file mode 100644
index 725a109..0000000
--- a/libraries/Esplora/Experts/EsploraPong/EsploraPong.ino
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- Esplora Pong
-
- This sketch connects serially to a Processing sketch to control a Pong game.
- It sends the position of the slider and the states of three pushbuttons to the
- Processing sketch serially, separated by commas. The Processing sketch uses that
- data to control the graphics in the sketch.
-
- The slider sets a paddle's height
- Switch 1 is resets the game
- Switch 2 resets the ball to the center
- Switch 3 reverses the players
-
- You can play this game with one or two Esploras.
-
- Created on 22 Dec 2012
- by Tom Igoe
-
- This example is in the public domain.
- */
-
-#include <Esplora.h>
-
-void setup() {
- Serial.begin(9600); // initialize serial communication
-}
-
-void loop() {
- // read the slider and three of the buttons
- int slider = Esplora.readSlider();
- int resetButton = Esplora.readButton(SWITCH_1);
- int serveButton = Esplora.readButton(SWITCH_3);
- int switchPlayerButton = Esplora.readButton(SWITCH_4);
-
- Serial.print(slider); // print the slider value
- Serial.print(","); // add a comma
- Serial.print(resetButton); // print the reset button value
- Serial.print(","); // add another comma
- Serial.print(serveButton); // print the serve button value
- Serial.print(","); // add another comma
- Serial.println(switchPlayerButton); // print the last button with a newline
- delay(10); // delay before sending the next set
-}
-