IDEA9201 | IDEA Lab 2

Here are the slides for IDEA9201 (IDEA Lab 2):

IDEA9201-Lecture-01

IDEA9201-Lecture-02

IDEA9201-Lecture-03

IDEA9201-Lecture-04

IDEA9201-Lecture-05

IDEA9201-Lecture-06

IDEA9201-Lecture-07

IDEA9201-Lecture-08

IDEA9201-Lecture-09

IDEA9201-Lecture-10

IDEA9201-Lecture-11

Arduino (Firmata) library for Processing, which fixes the IllegalAccessError in Processing 2.0:

processing-arduino-master.zip

Here is the code you need to run the Sparkfun Inventor’s Kit circuits in Arduino:

Here are the assignment briefs:

IDEA9201-Assignment-01

IDEA9201-Assignment-02

IDEA9201-Assignment-03

IDEA9201-Assignment-04


Example code for drawing a rectangle around some text:

size(200, 200);
textSize(32);

stroke(0, 64);
line(0, height/2, width, height/2);
line(0, height/2 - textAscent(), width, height/2 - textAscent());
line(0, height/2 + textDescent(), width, height/2 + textDescent());

float myTextWidth = textWidth("Rectangle");
line(width/2 - myTextWidth/2, 0, width/2 - myTextWidth/2, height);
line(width/2 + myTextWidth/2, 0, width/2 + myTextWidth/2, height);

float myTextHeight = textAscent() + textDescent();

fill(0);
textAlign(CENTER, BASELINE);
text("Rectangle", width/2, height/2);

stroke(255, 0, 0);
noFill();
rect(width/2 - myTextWidth/2 - 2, height/2 - textAscent() - 2, myTextWidth + 4, myTextHeight + 4);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s