blue book examples

This commit is contained in:
benfry
2011-01-26 20:26:16 +00:00
parent a5fb67810a
commit cd888bc239
927 changed files with 36898 additions and 0 deletions
@@ -0,0 +1,30 @@
import processing.phone.*;
Phone p;
void setup() {
p = new Phone(this);
noLoop(); // No drawing in this sketch, so we don't need to run the draw() loop
}
void keyPressed() {
switch (key) {
case '1':
// Vibrate the phone for 200 milliseconds
p.vibrate(200);
break;
case '2':
// Flash the backlight for 200 milliseconds
p.flash(200);
break;
case '3':
// Dial 411 on the phone
p.call("411");
break;
case '4':
// Launch the Web browser
p.launch("http://mobile.processing.org/");
break;
}
}