- 1x Makey Makey. You can get the original product for much cheaper here.
- 7x Alligator Leads (like these)
Once you have your Makey Makey, go to my fork of the Makey Makey source and clone it.
Once you have your Makey Makey, go to my fork of the Makey Makey source and clone it.
// Four variables, each one for the progress of their | |
// particular planet around their center of orbit | |
int mercury = 0; | |
int venus = 0; | |
int earth = 0; | |
int moon = 0; | |
void setup() { | |
// 400x400 canvas |
// LED Toggle | |
// Luke Tuthill for the University of Sydney | |
#include "CurieIMU.h" | |
// Green LED on pin 3 | |
#define GREEN 3 | |
void setup() { | |
// Setup the IMU |
// LED Pin | |
int LED_PIN = 3; | |
// Sound Sensor pin | |
int SOUND_PIN = A0; | |
// Number of readings | |
int NUM_READINGS = 10; | |
int READING_DELAY = 1; |
#include <CurieBLE.h> | |
/* IMPORTANT: | |
* REPLACE "UNIKEY" BELOW WITH YOUR UNIKEY | |
*/ | |
// The pin our LED is going to be on | |
int LED_PIN = 3; | |
// Create a Service |
/* | |
* Adapted from the [completely broken] DFRobot example sketches | |
* by Luke Tuthill: | |
* https://www.dfrobot.com/blog-663.html | |
* | |
* This sketch flashes an LED based on the surrounding volume. | |
*/ | |
// The threshold at which the LED will turn on. Try playing with this, |
/* | |
* Adapted from the [completely broken] DFRobot example sketches | |
* by Luke Tuthill: | |
* https://www.dfrobot.com/blog-661.html | |
* | |
* This sketch lights up an LED when the motion detector detects something. | |
*/ | |
// The Motion Sensor should be on digital pin 2 |
/* | |
* Adapted from the [completely broken] DFRobot example sketches | |
* by Luke Tuthill: | |
* https://www.dfrobot.com/blog-662.html | |
* | |
* | |
* This sketch shows how to debounce a button. Sometimes, when you press | |
* a button, it's not perfect - sometimes it 'bounces' up and down slightly, | |
* and registers multiple presses. | |
* |
public class Tree<E> { | |
Tree left; | |
Tree right; | |
E val; | |
public Tree(E e) { | |
this.val = e; | |
} | |
public Tree<E> getLeft() {return this.left;} | |
public Tree<E> getRight() {return this.right;} |