This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
#include <DailyStruggleButton.h> | |
// pins for all the buttons | |
#define GO_BUTTON 13 | |
#define PLAYER_1 12 | |
#define PLAYER_2 8 | |
#define RESET_BUTTON 7 | |
// pints for all the LEDS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
#include <DailyStruggleButton.h> | |
// pins for all the buttons | |
#define GO_BUTTON 13 | |
#define PLAYER_1 12 | |
#define PLAYER_2 8 | |
#define RESET_BUTTON 7 | |
// pints for all the LEDS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NeoPixel test program showing use of the WHITE channel for RGBW | |
// pixels only (won't look correct on regular RGB NeoPixel strips). | |
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket | |
#endif | |
// Which pin on the Arduino is connected to the NeoPixels? | |
// On a Trinket or Gemma we suggest changing this to 1: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
// pins for all the buttons | |
#define GO_BUTTON 13 | |
#define PLAYER_1 12 | |
#define PLAYER_2 8 | |
#define RESET_BUTTON 7 | |
// pints for all the LEDS | |
#define LED_PIN_PLAYER_1 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { // Executes once | |
size(640, 480); | |
// Specifying the USB port to which the Arduino is connected | |
// And attaching to the serial object | |
// ##### CHANGE FOR YOUR MACHINE, CHECK IN ARDUINO IDE ##### | |
String portName = "COM3"; | |
port = new Serial(this, portName, 9600); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import processing.serial.*; // Importing the Serial library | |
import java.util.Map; // Importing library to use HashMap | |
Serial port; // Creating an object to handle serial communication | |
// String variable to store the received serial string | |
String serialString; | |
// Dictionary for all the values received over serial | |
HashMap<String, Integer> serialData = new HashMap<String, Integer>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int swPin = 3; | |
const int digPinX = A0; | |
const int digPinY = A1; | |
const int potenPin = A2; | |
const int buttonPin = 5; | |
void setup() { | |
pinMode(swPin, INPUT_PULLUP); | |
Serial.begin(9600); | |
pinMode(potenPin, INPUT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String serialString; | |
// Dictionary for all the values received over serial | |
HashMap<String, Integer> serialData = new HashMap<String, Integer>(); | |
void setup() { // Executes once | |
size(640, 480); | |
// Specifying the USB port to which the Arduino is connected | |
// And attaching to the serial object | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() { // Executes once | |
// Creates a window of size width 640, height 480 | |
size(640, 480); | |
} | |
void draw() { // Executes in a constant loop | |
fill(208,1,125); | |
ellipse(mouseX, mouseY, 5, 5); | |
} |
NewerOlder