Inside of the box
RMH
he wasn't even looking at me and he found me
Claire Keane
2025 on Tumblr: Trends That Defined the Year

blake kathryn
Monterey Bay Aquarium

if i look back, i am lost
Keni
ojovivo

Kiana Khansmith
hello vonnie
Cosimo Galluzzi
DEAR READER


TVSTRANGERTHINGS
Jules of Nature
Sade Olutola
almost home
seen from Argentina
seen from United States
seen from United States
seen from Brazil
seen from Singapore

seen from South Africa

seen from Argentina

seen from United States
seen from United States
seen from United States

seen from United States
seen from United States

seen from Germany
seen from United States

seen from Germany

seen from United States

seen from United States
seen from Canada

seen from United States

seen from United States
@arduinodevelopment-blog
Inside of the box

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Finished box
Lasercut Box
Screen display including logos
Box including Napier logo

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Laser cut box - ideas
Black and white test
Testing different colours
Images and Tweets combined
Using Twitter/Reading tweets
One of the requirements of the projects is displaying tweets with a certain #. Fortunately there is a working library for using twitter with Processing - Twitter4j!
Documentation: http://twitter4j.org/en/javadoc.html
Useful tutorial: http://codasign.com/tutorials/processing-and-twitter/ (this includes helpful instructions on how to install the library & how to get the relevant keys from twitter)
Code displaying tweets (slightly adjusted from tutorial above):
import twitter4j.conf.*; import twitter4j.*; import twitter4j.auth.*; import twitter4j.api.*; import java.util.*;
Twitter twitter; String searchString = "#Edinburgh"; List<Status> tweets; int currentTweet; int time = millis();
void setup() { size(800, 600);
ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setOAuthConsumerKey("---yourConsumerKeyHere---"); cb.setOAuthConsumerSecret( "---yourConsumerSecretHere---" ); cb.setOAuthAccessToken("---yourAccessTokenHere---" ); cb.setOAuthAccessTokenSecret( "---yourAccessTokenSecretHere---" );
TwitterFactory tf = new TwitterFactory(cb.build());
twitter = tf.getInstance();
getNewTweets(); currentTweet = 0;
thread("refreshTweets"); background (0); }
void draw() {
if (millis() > time + 2000) { fill(0, 255); rect(0, 0, width, height); delay(200); currentTweet = currentTweet + 1; if (currentTweet >= tweets.size()) { currentTweet = 0; } Status status = tweets.get(currentTweet); fill(200); text(status.getText(), (width/20), height - (height/5), 600, 300); //delay(250); time = millis(); } }
void getNewTweets() { try { // try to get tweets here Query query = new Query(searchString); QueryResult result = twitter.search(query); tweets = result.getTweets(); } catch (TwitterException te) { // deal with the case where we can't get them here System.out.println("Failed to search tweets: " + te.getMessage()); //System.exit(-1); } }
void refreshTweets() { while (true) { getNewTweets();
println("Updated Tweets");
delay(30000); } }

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Colour Adjustment to fit with branding
Different coloured backgrounds to fit with the branding of Historic Environment Scotland.
Border
After deciding on a general arrangement of the images, a border around them was requested. To avoid hardcoding numbers - which would make the sketch not adaptable to different screen sizes - this code is used:
image(startImage1, ((width/2) - (startImage1.width + height/80)), height/40); image(startImage2, width/2 + height/80, height/40); image(startImage3, ((width/2) - (startImage1.width + height/80)), startImage1.height + (2* (height/40))); image(startImage4, width/2 + height/80, startImage1.height + (2* (height/40)));
Communication with Arduino
Using Serial communication between Arduino and Processing did not work out because it was to slow. When the baud rate was increased Processing was not able to read the sent data.
Solution:
Using Firmata - following the tutorial will allow an introduction to basic communication through processing, ensure to upload the relevant sketch from the Arduino IDE before.
Processing code using firmata:
*Please note that this is not working code, those are examples of which parts of the code were added to work with firmata
import processing.serial.*; import cc.arduino.*;
Arduino arduino;
Serial myPort; // Create object from Serial class String value; // Data received from the serial port
void setup() {
println(Arduino.list());
arduino = new Arduino(this, Arduino.list()[0], 57600);
}
void loop(){
heartrate1 = arduino.analogRead(0); heartrate2 = arduino.analogRead(1); heartrate3 = arduino.analogRead(2); heartrate4 = arduino.analogRead(3);
if (450 >= heartrate1 || heartrate1 >= 650){ if (450 >= lastheartrate1 || lastheartrate1 >= 650){ startImage1 = photoRow1[int(random(photoRow1.length))]; println("heartrate1 is "+heartrate1); } } else { println("heartrate1 is "+heartrate1); }
if (450 >= heartrate2 || heartrate2 >= 650){ if (450 >= lastheartrate2 || lastheartrate2 >= 650){ startImage2 = photoRow2[int(random(photoRow2.length))]; println("heartrate2 is "+heartrate2); } } else { println("heartrate2 is "+heartrate2); }
if (450 >= heartrate3 || heartrate3 >= 650){ if (450 >= lastheartrate3 || lastheartrate3 >= 650){ startImage3 = photoRow3[int(random(photoRow3.length))]; println("heartrate3 is "+heartrate3); } } else { println("heartrate3 is "+heartrate3); }
if (450 >= heartrate4 || heartrate4 >= 650){ if (450 >= lastheartrate4 || lastheartrate4 >= 650){ startImage4 = photoRow4[int(random(photoRow4.length))]; println("heartrate4 is "+heartrate4); } } else { println("heartrate4 is "+heartrate4); }
lastheartrate1 = heartrate1; lastheartrate2 = heartrate2; lastheartrate3 = heartrate3; lastheartrate4 = heartrate4;
delay(500); }
Helpful guide for Serial communication between Arduino und Processing:
https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing
Resizing the arrays of images
for (int i = 0; i< photoRow4.length; i++) { photoRow4[i].resize(0, height/2); }

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Those two options seem to conceal the mismatch in format better than leaving a big space in the middle of the screen.
For photos centered in the middle of the screen:
image(startImage1, ((width/2) - startImage1.width), 0); image(startImage2, width/2, 0); image(startImage3, ((width/2) - startImage1.width), height/2); image(startImage4, width/2, height/2);
How the screen ideally would look, if the screen size and picture format would match up. The following post will show options on how to deal with the bar left if the formats don’t match up.