Saturday, November 12, 2005

▁▃▅▇█FILE:006█▇▅▃▁

:: WORKSHOP ::

[Paul demostrate how to connect the BX with computer by Processing and how to change the color in the output window by changing the variable resistor. however, because of going to Reading, so i cannot participate the whole workshop]
[code of Processing]

import processing.serial.*;

String buff = "";
int val = 0;
int NEWLINE = 10;
PImage b;

Serial port;

void setup()
{
size(400, 400);

// Print a list in case COM1 doesn't work out
println("Available serial ports:");
println(Serial.list());

//port = new Serial(this, "COM1", 19200);
// Uses the first available port
port = new Serial(this, Serial.list()[0], 19200);
}

void draw()
{
while (port.available() > 0) {
serialEvent(port.read());
}
background(val);
fill(80, 80, 80);
ellipse(val, val, 50, 50);
b = loadImage("trial.jpg");
image(b, 0, val, width, val);

}

void serialEvent(int serial)
{
// If the variable "serial" is not equal to the value for
// a new line, add the value to the variable "buff". If the
// value "serial" is equal to the value for a new line,
// save the value of the buffer into the variable "val".
if(serial != NEWLINE) {
buff += char(serial);
} else {
buff = buff.substring(0, buff.length()-1);
// Parse the String into an integer
val = Integer.parseInt(buff)/4;
println(val);
// Clear the value of "buff"
buff = "";
}
}

[code of BX-24]

Sub main()
call delay(0.5) ' start with half-second delay
do
' returns values between 0 and 1023
' the variable resistor is in pin 18
debug.print cstr(getADC(18))
call delay(0.1) ' one-tenth second delay
loop
end sub



:: INSPIRATION/RΣSΣARCH ::

[ Processing Beta 093 was installed this week, i am spending time to play with the examples and trying to understand the codes... i found some codes like //import processing.video.*;// and //void captureEvent(Capture camera)//, which should be useful for my programme.]

4 Comments:

Blogger oakleyses said...

polo ralph lauren outlet online, michael kors outlet online, gucci handbags, nike free, nike outlet, longchamp outlet, louis vuitton outlet, ray ban sunglasses, oakley sunglasses wholesale, michael kors outlet online, oakley sunglasses, christian louboutin, replica watches, michael kors outlet, louis vuitton, michael kors outlet, prada handbags, jordan shoes, nike air max, uggs outlet, tiffany jewelry, michael kors outlet online, ray ban sunglasses, ray ban sunglasses, longchamp outlet, cheap oakley sunglasses, tiffany and co, ugg boots, nike air max, burberry handbags, christian louboutin shoes, christian louboutin outlet, uggs outlet, oakley sunglasses, prada outlet, longchamp outlet, louis vuitton outlet, ugg boots, michael kors outlet online, replica watches, christian louboutin uk, polo outlet, chanel handbags, louis vuitton, louis vuitton outlet, uggs on sale, kate spade outlet

6:40 PM  
Blogger oakleyses said...

louboutin pas cher, mulberry uk, north face, abercrombie and fitch uk, nike roshe, coach outlet, nike air max uk, vans pas cher, new balance, nike blazer pas cher, polo ralph lauren, true religion outlet, oakley pas cher, polo lacoste, jordan pas cher, sac vanessa bruno, north face uk, sac hermes, kate spade, ralph lauren uk, nike roshe run uk, nike air max, timberland pas cher, converse pas cher, ray ban uk, true religion jeans, nike air force, michael kors pas cher, hogan outlet, hollister uk, nike free run, michael kors, coach purses, ray ban pas cher, true religion outlet, sac longchamp pas cher, burberry pas cher, lululemon canada, michael kors outlet, air max, guess pas cher, coach outlet store online, longchamp pas cher, nike air max uk, replica handbags, nike tn, nike free uk, true religion outlet, michael kors, hollister pas cher

6:42 PM  
Blogger oakleyses said...

iphone cases, louboutin, bottega veneta, iphone 6s plus cases, hermes belt, iphone 6s cases, nfl jerseys, mac cosmetics, herve leger, timberland boots, nike huaraches, iphone 5s cases, hollister, baseball bats, instyler, iphone 6 plus cases, ipad cases, nike air max, s6 case, wedding dresses, asics running shoes, ferragamo shoes, vans outlet, north face outlet, longchamp uk, mont blanc pens, nike roshe run, p90x workout, north face outlet, beats by dre, ghd hair, new balance shoes, chi flat iron, jimmy choo outlet, soccer shoes, lululemon, nike trainers uk, abercrombie and fitch, mcm handbags, valentino shoes, iphone 6 cases, giuseppe zanotti outlet, hollister clothing, reebok outlet, insanity workout, ralph lauren, oakley, babyliss

6:45 PM  
Blogger oakleyses said...

doudoune moncler, juicy couture outlet, moncler, thomas sabo, louis vuitton, ray ban, canada goose, links of london, louis vuitton, canada goose, supra shoes, ugg, louis vuitton, swarovski, gucci, vans, canada goose, doke gabbana, moncler outlet, nike air max, marc jacobs, wedding dresses, louis vuitton, pandora jewelry, louis vuitton, moncler, karen millen uk, swarovski crystal, montre pas cher, moncler, canada goose outlet, converse, replica watches, canada goose uk, coach outlet, canada goose outlet, barbour uk, canada goose jackets, ugg pas cher, lancel, canada goose outlet, moncler outlet, juicy couture outlet, pandora jewelry, barbour, moncler uk, hollister, converse outlet, pandora uk, ugg,uggs,uggs canada, moncler, ugg uk

6:48 PM  

Post a Comment

<< Home