Archive for February, 2009

Come See Us Speak!

Thursday, February 26th, 2009

It’s time to get out and spread the *duino love.  Droops and I (Morgellon), will speaking again at various computer conferences through out this year.

Outerz0ne 5 - Atlanta, GA

Outerz0ne 5 Atlanta, GA March 6 - 7, 2009

I’ll be at Outerz0ne 5 in Atlanta, GA March 6th – 7th, 2009.  (kinda short notice, as it is next weekend…)

My talk there is entitled, *Dunio-Punk! Manifesting Open Source in Physical Space.  You can read more about it and the others talking at the Outerz0ne 5 Speaker Page.  If you’re near the Atlanta area, be sure to swing by and say hello!  Outerz0ne 5 will be at the Wellesley Inn 1377 Virgina Ave Atlanta, GA 30344 (more info at Outerz0ne 5 website)
View Larger Map

Notacon 6 Cleveland, OH April 16 - 19, 2009

Droops and I will both be at Notacon 6 in Cleveland, OH April 16th – 19th, 2009. (A bit more notice here…)

Our talk there is entitled, Interactivity with Arduinos, Transducing the Physical World.  You can read more about it and others talking at the Notacon 6 Speaker Page.  If you’re near the Ohio area, make plans to come out and spend the weekend at Notacon 6!  Notacon 6 will be held at the Wyndham Cleveland at Playhouse Square, Downtown Cleveland, OH 1260 Euclid Ave Cleveland, OH 44115. (plenty of directions and more info at the Notacon 6 site)

Don’t worry if you can’t make it out, I’ll do my best to post pictures and the video of the talk from Outerz0ne and Notacon.

Know of a conference where we should be speaking?  Be sure to drop us a line and let us know!

Basic Processing to Arduino Communications: part 2

Monday, February 23rd, 2009

Continuing from the last sketch, I’ve done the same thing but in a different manner.  I still have Processing generate a square and when the mouse moves over the square it lights a LED on the Arduino, just as before.  Although this time, the only code on the Arduino is the “Standard Firmata” sketch.

Processing interfaces with Firmata to control the pins as one would in the Arduino IDE.  So instead of sending for “H” or “L” on the serial port, we send arduino.digitalWrite(ledPin, Arduino.HIGH) or arduino.digitalWrite(ledPin, Arduino.LOW) on the serial port.  See the video below for examples, and code at the bottom.


Basic Processing to Arduino Communications part 02 from Morgellon on Vimeo.

My first impressions of Firmata and why one would use it:

  • All code is stored in Processing, commands are sent via serial, an Arduino running Firmata interprets commands.
  • With the Arduino running Firmata, Processing can change the different values, variables, or even “load” different “sketches”… this could eliminate the need to flash different sketches to the Arduino, and use Processing to “simulate” this when needed.
  • Perhaps by keeping the code in Processing and sending commands via serial to be handled by the Firmata on the Arduino, would mean that one would not be restricted by the memory size of the Arduino chip. (This is just a guess on my part).

First impressions of Firmata and why one would NOT use it.

  • To have functionality with the Arduino after unplugging it from USB, the code would need to be running on the Arduino.  Once the Arduino is unplugged from USB, there is nothing for Firmata to interpret, so the Arduino will do nothing.

Processing Code

import processing.serial.*;
import cc.arduino.*;

Arduino arduino;
int ledPin = 12;

void setup()
{
println(Arduino.list());
arduino = new Arduino(this, Arduino.list()[0]); // v2
//arduino = new Arduino(this, Arduino.list()[0], 57600); // v1
arduino.pinMode(ledPin, Arduino.OUTPUT);

size(200, 200);
noStroke();
frameRate(10);
}

void draw()
{
background (255);
if (mouseOverRect() == true) {  //if mouse over square
fill(242, 204, 47);  //yellow color
arduino.digitalWrite(ledPin, Arduino.HIGH);  //LED on
} else {
fill(0);  //black color
arduino.digitalWrite(ledPin, Arduino.LOW);  //LED off
}
rect(50, 50, 100, 100);  //draws the square
}

boolean mouseOverRect() {
return ((mouseX >= 50) && (mouseX <= 150) && (mouseY >= 50) && (mouseY <= 150));
}

Basic Processing to Arduino Communications

Friday, February 20th, 2009

Finally sat down and figured out how to send some basic signals via serial from Processing to an Arduino.  For this example I was just looking for basic functionality, so I settled for a simple way to turn a LED on and off.  It’s also mostly sample code gathered from the Internet.

The Processing code creates a small black square on the screen.  When the mouse cursor is moved over the square, it changes color to yellow and sends a “H” over serial to the Arduino.  While the Arduino detects a “H” on serial it will light the LED.

Here’s a video of it in action and describing how to get started.

Basic Processing to Arduino Communications from Morgellon on Vimeo.

  • Download Processing

http://processing.org/download/index.html

  • Download Arduino to Processing Library

http://www.arduino.cc/playground/Interfacing/Processing

Now that you’ve gotten all the files installed and in their proper places, try out my test code I used in the video.

Arduino Code (Download here)

//  Read data from the serial port and turn ON or OFF a light depending on the value

char val;         //Data received from the serial port
int ledPin = 13;  //Set value ledPin to pin 13

void setup(){
pinMode(ledPin, OUTPUT);  //Sets pin as OUTPUT
Serial.begin(9600);    //Start serial communication at 9600bps
}

void loop(){
if (Serial.available()){  //If data is available to read,
val = Serial.read();    //read it and store it as val
}
if (val == ‘H’){              //If H is recieved
digitalWrite(ledPin, HIGH);  //turn ON light
} else {
digitalWrite(ledPin, LOW);  //If not leave light OFF
}
delay(25);
}

Processing Code(Download here)

//Check if the mouse is over a rectangle and write the status to the serial port

import processing.serial.*;
import cc.arduino.*;


Serial port;    //Create object from Serial class

void setup() {
size(200, 200);
noStroke();
frameRate(10);
//Open the port that the board is connected to and use the same speed (9600bps)
port = new Serial(this, Serial.list()[0], 9600);
}

void draw() {
background (255);
if (mouseOverRect() == true) {  //If mouse if over square
fill(242, 204, 47);                    //change color
port.write(’H');              //send H to serial port
} else {            //If mouse is NOT over square
fill(0);          //change color
port.write(’L');  //send L to serial port
}
rect(50, 50, 100, 100);  //Draws the square
}

boolean mouseOverRect() {    //Tests if mouse is over square
return ((mouseX >= 50) && (mouseX <= 150) && (mouseY >= 50) && (mouseY <= 150));
}

Thoughts on Solder

Tuesday, February 3rd, 2009

Wow, ice storms pack quite a wrath! Having no power for almost a week made me really consider doing some “alternative energy powered” Arduino projects. Perhaps using a solar panel, dynamo or other method… but first a week worth of Internet to catch up on!! While I catch up, here’s a neat video to tide you over until the next post!

Did you know there are different types of Solder? Solder comes in many different forms, with various melting points and properties!

Here’s a great video detailing some of the differences and possible myths between lead/lead-free solder



  • Viagra online
  • Order cheap cialis
  • Buy viagra no prescription
  • Cialis online
  • Buy generic cialis
  • Order propecia no prescription
  • Cheap propecia online
  • Propecia online pharmacy
  • Order levitra online
  • Cheap price cialis
  • Online pharmacy levitra
  • Buy viagra online
  • Buy discount levitra
  • Cheap cialis online
  • Propecia hair loss