Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used after 'URL-Rewriter' in /usr/www/users/hxchoz/mignongamekit/wp-content/themes/oval/header.php on line 2
Mignon Game Kit

Mignon Photoresistor Theremin

Plug the Photoresistor in the extensions port to GND and to PIN19.

This code plays a permanent tone, which get as higher as less light is hitting the photoresistor.

#include <gamekit_2_1.h>

int light; // variable for the senor value

void setup(){
gamekit.Begin();

// enable pull up resistor for analog in
digitalWrite(19, HIGH);
}

void loop(){
light = analogRead(5);
gamekit.play_tone(light, 100,LOUD);
}

© olaf val, 2013