Raspberry Pi Gets Processing
Written by David Conrad   
Wednesday, 18 November 2015

If you haven't discovered Processing - it's a programming language - then you have missed out on some fun. Now you can have even more fun with the newly announced Raspberry Pi version of Processing.

raspberrypilogo

Processing is a language based on Java that is often used by us arty types to create graphics and installation art. If you are not an arty type don't be put off because it is a remarkably easy-to-use dialect of Java that couples straight into some easy-to-use graphics. You can think of it as Java with some built-in graphics commands. 

It is particularly easy to do animation in Processing because the standard draw function is called repeatedly as part of an update loop. For example, the program:

void setup() {  
 size(400, 400);
 stroke(255);
 background(192, 64, 0);
}
void draw() {
 line(150, 25, mouseX, mouseY);
}


draws a line between 150,25 and the current position of the mouse. 

If this reminds you of how the Arduino works, then you are correct as the Arduino software is derived from Wiring which in turn was derived from Processing. 

Completing the circle, Processing now has a standard hardware I/O library which means it can be used to do embedded programming just like Wiring.  This makes it very easy for programmers to create graphical programs and programs the interact with the real world. 

raspibplus

Now we have a version of Processing, including the Hardware I/O library, for the Raspberry Pi. You can install it with a single command and start writing Processing programs at once.

It works on the Pi or the Pi2 running Raspbian. There is even a Raspbian image with Processing preinstalled. 

 

processing1

 

The Pi version of Processing - Pi Processing? - can make use of the Pi's standard OpenGL library and display the results on a monitor. However, the new Hardware I/O library lets you make use of the GPIO lines to control things in the outside world. You also get an I2C bus, SPI, serial and PWM. You can also flash the Pi's built-in LEDs. Add to this the fact that you can also work with the official Pi display and you can create touch enabled Processing programs.

Given the low cost of the Pi and the availability of something as powerful and easy to use and Processing it is going to become a good choice for anyone wanting to create artistic installation or just a dull IoT device. It also means that the Arduino has even more competition in that the Pi is now just as easy to program but much more a complete computer. 

 

processingicon

More Information

https://github.com/processing/processing/wiki/Raspberry-Pi

Related Articles

Processing: Creative Coding and Generative Art in Processing2 (book review)

Processing's Hour of Code

Raspberry Pi Gets Its Official Touch Screen       

Windows 10 IoT Core - Raspberry Pi Home Automation Contest  

Raspberry Pi 2 - Quad Core And Runs Windows       

Microsoft Tears Node.js From V8  

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin

 

Banner


Diabolo Juggling By Robot Arms
22/11/2020

Watching two robot arms play diabolo is enough to induce diabolo envy in anyone who has ever experimented with this type of toy. The good news is that Omron is going to release the simulation model, d [ ... ]



.NET 5 Ready For Action
11/11/2020

The release of .NET 5, announced at .NET Conf 2020, is a historic moment, but one tinged with regret and anxiety. This release unifies .NET to just one on-going framework. What this holds for the futu [ ... ]


More News

 

square

 



 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Wednesday, 18 November 2015 )