Processing

Processing is an open source “sketchbook” for new ideas, designed as a powerful but easy-to-learn tool for designers and beginners who “want to create images, animations and interactions”.

Usually, I’m quite skeptical about languages with that kind of a learning curve/marketing strategy. (I’m a firm believer in good old K+R C as a first language), but this one got me kinda excited. Maybe because of the OpenGL stuff behind it :-).

First, I downloaded Processing.
It is based on Java, which means it needs the Runtime. I was already in Win7, so I decided to get started with the Windows version, but I will definitely use it on Ubuntu or Mint, so I downloaded that one, too.

First glance of processing

First glance of processing

It’s very clear that the Arduino software was written with this ;-), so on a whim (and without any tutorial or stuff) I decided to look into File->Examples. Somewhere, there are examples from books written on Processing (I don’t own any of them, yet, but as someone who LOVES books, I will soon do so), and rather randomnly, I started this one:

// Example 02-02 from "Getting Started with Processing"
// by Reas & Fry. O'Reilly / Make 2010

void setup() {
size(480, 120);
smooth();
}
void draw() {
if (mousePressed) {
fill(0);
} else {
fill(255);
}
ellipse(mouseX, mouseY, 80, 80);
}

It’s quite simple, and quick googling sent me back to their web site and teaches me that setup() is used as an init state and draw is an endless main loop. (Explanation)

Processing is easy to read. Really, for someone with a programming background, it’s almost too easy, the examples are good, the sytanx makes sense (I’m sure I’ll hate parts of it at some later point, but the basics seem to be very logical).

Or maybe I’ve seen way too many languages and the tutorials are aimed at people who have never seen any of them.
Feeling ambitious, I’m planning to write to thigns with this:
a – a “gui program”, complete with state machine,some buttons, loading some picture, maybe drawing a histogram and a list with data). Also, some menu bars, option buttons, maybe saving data, maybe loading it…
b – a terminal program that can read / write RS232 (I have a USB-FTDI  cable in my backpack, also, an Arduino, but connecting rxd and txd isn’t that hard (It’s called a loopback, and somewhere in my room, I should even have a DB9 with that one).

Advertisements

2 comments

  1. […] week I announced that I wanted to write a small terminal program in […]

  2. […] specs in this post  a “gui program”, complete with state machine,some buttons, loading some picture, maybe […]

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

%d bloggers like this: