Changes

Jump to: navigation, search

Week 4 Lab

360 bytes added, 03:29, 21 April 2009
Interfacing
*Download and install processing http://processing.org/download
*== Serial Interface, for debugging ==
Sketchbook->Examples->Communication->ASCIITable
Serial.print()
Serial.println()
== Dimmer ==
Examples->Communication->Dimmer
 
Controlling a physical LED with the computer.
<code>void loop(){ char val; // check if data has been sent from the computer if (Serial.available()) { // read the most recent byte (which will be from 0 to 255) val = Serial.read(); if((val>='0')&&(val<='9')) analogWrite(ledPin, 25*(val-'0')); }}</code>
*Processing, MaxMSP, and many more.
*Computer -> Arduino

Navigation menu