New LCDs and Serial Ports and some Max/MSP for good measure

I haven’t posted on this project for a little while, partially because of the preparation for the ongoing Save the City project, and partially because the little time that I’ve had to work on this has only resulted in small increments. So, I figured I would wait until I had some more significant updates to make to post, and here they are.

Basically, I’ve been working on a couple parts of the project. I’ve been updating a Max/MSP/Jitter project that BCL had previously used for our projection performances to try to automate some of the scaling of text depending on what the input is, while also continuing with the Arduino and LCD integration.

So first, some of the shots of the Max patch.

It’s a bit crude, but basically, the patch will ask for the number of letters per line and then scale the text size appropriately.

However, I couldn’t figure this out on my own. I made some notes on the relationship I was seeing, but I wasn’t sure how to translate that mathematically.

I figured the relationship was something like this.

So, I called my brother with a degree in engineering, and asked him for some help. He came through!

This is what he came up with initially: 625 * x^-1 … I adjusted it a bit to 925, as that number seemed to do better with more letters, which would more often be the case.

So, here’s the patch work, doing a good job at scaling 3 letters to the appropriate size to fill the majority of the window. The reason I’m continuing with playing with this Max patch is that it may provide an alternative to the Arduino+LCD combo if it doesn’t end up working the way I need it to.

So, after some frustration a little while ago, I picked up some new screens and everything is working as I had hoped. I’m still not sure why I was having troubles before with the contrast, and it’s frustrating that I couldn’t come to some resolution about it.

I had picked up a book on Processing and I’ve skimmed through it a couple of times in the past, but never when I actually had time to work in Processing on a project.

So, at first, I was just trying to figure out how to understand Arduino and Processing talking to one another. I ran some example patches and I didn’t get any warning flags when running the serial library in Processing, so I set out trying to test the actual communication.

Here’s another example, I can’t quite remember what this resulted in specifically, and it may have been that I was just trying to run another basic test to ensure something was working as anticipated.

Next, Processing listed the available serial ports, using the first one in the array worked perfectly.

The result – hollar! – the first thing I sent to Arduino from Processing. It finally made sense to me: Arduino needed a sketch that will listen (or technically read) from the Serial port.

And here’s the Arduino patch that did that work!

Shortly thereafter though, upon trying to backtrack, simplify and just have the process start without having the Arduino client open, something wasn’t working. I couldn’t figure it out, so I tried to think back to how I had set it up in the first place. Conceptually, I had difficulty understanding how this serial port thing worked. Something finally clicked. Processing needs to send messages through the Serial port.  Somehow I wasn’t cluing in to envision it as an actual port that data would pass through. I’m not sure why I didn’t pick up on understanding the relationship between Arduino and the serial port for stuff like this earlier. Looking at the examples that used Python may have confused me I think, since I don’t know that language. Looking at them now though, I understand better how it all works.

Arduino just needs to listen for something coming over the serial port and then ask the LCD to print that incoming message.

It also helped to finally test with the serial monitor from Arduino environment, which helped to illustrate immediately what was going on. I think I understood the basics of serial port communication (as in, a message can be sent over this), but I wasn’t cluing in that Arduino had to be setup to listen for those messages, which may have led to some of my confusion.

However, it seems as though I need to open up the serial monitor and send a message to Arduino before it will hear anything from Processing. I wonder why — I assume I’m not initializing it properly?

Upon further reading, my other thought is that the Serial port isn’t available to Processing, possibly it’s in use by something else, thereby preventing Processing from accessing it? The strange part, though, is that once I open the Serial Monitor in the Arduino environment / client, Processing can send messages without any problem. I’ll have to look into this some more.

And, once again, the Arduino patch that makes this all work.

At any rate, things are moving along nicely. I’m doing some replicating of other people’s projects to familiarize myself with how to integrate an Arduino and LCD screen into something a bit more automated.

Next on the list, start having Processing cycling through text files. There’s a lot of examples of this using Python, but I’m going to look into Processing instead.

Annotated bibliography for the last couple of weeks:

http://www.ladyada.net/make/pumpkin/pumpkin.html (great idea for introducing a distributed urban surface sound project)

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=print;num=1181079252 (solar-powered Arduino help)

http://www.adafruit.com/index.php?main_page=product_info&cPath=35&products_id=172 (range finder)

http://www.adafruit.com/index.php?main_page=product_info&cPath=37&products_id=198 (the LCD screens I got)

http://clete2.com/2009/11/control-lcd-text-over-web-interface-arduino/ (controlling LCD over web)

http://www.arduino.cc/playground/Interfacing/Processing (Interfacing Processing and Arduino)

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1255733236 (Process + Serial + LCD to display Tweets)

http://itp.nyu.edu/physcomp/Labs/SerialOut (some tutorials on physical computing)

http://drewish.com/content/2009/06/simple_arduino_serial_communications (simple serial communications)

http://www.akeric.com/blog/?p=1015 (arduino / processing / python)

I would like to thank the Canada Council for the Arts for their generous support.

Tagged:

Related Posts: More Arduino + LCD + PHP fun Getting Things to Talk: Arduino + LCDs Starting New Projects: Researching the Basics of Arduino + LCDs

Previous: « Next: »


Leave a Reply






Location

Windsor from Google Maps' perspective

Windsor, Ontario (South of Detroit)

Save the City !!!

Broken City Lab: Save the City
5 months of community events to imagine how to save this city.

Participate! March 20th, 3PM

Mailing List


 

Activity

Follow us on Twitter

Conversations

  • Michelle: SO FUNNY!
  • darren: I’m sure sparkfun has some too, maybe different.
  • Justin: ahhh nice. thanks for the link!
  • darren: adafruit has been selling those for quite a while http://www.adafruit.com/index. php?main_page=product_info&...
  • Justin: Yes, Mark, thanks for the pics and the suggestions for the list, that area around the Casino fell into the sites of apology side...
  • tinyenormous: Hi justin! For the 2 line contrast thing I have run into similar issues before. I recommend using a pot to control the...
  • Mark Boscariol: p.s. pelissier bldg isn’t mine, but I know the guy who bought it
  • Mark Boscariol: Cool, couldn’t make it but I hope you got the pics I dropped off. 3 houses across from casino parking garage...

Archives

Tags

3D 100 ways abandoned activism advertisements air airport algorithm Ambassador Bridge analog annotate architecture arduino art artist Artspace astroturf automobile awesome balloons banner baskets battery BCL Bench bicycle bike bikes billboard bio biodegradable Blog book books border brainstorm bridge buildings bus Canada car cellphone chalk Chattanooga Chicago cities city citynoise code collaborative collective community computer computers conference Conflux consultancy context costume create here crisis cross-border communication crowd-sourcing data database demo design Detroit development DIY documentary documentation downtown drawing driving ecohouse economy EC Row editing electricity electronics energy environment eric boucher event exhibition exploring extended field trip eye fake fashion fence field test fieldtrip fire firefox flagging tape fuel efficiency gallery game garbage garden gardening geography google google earth google maps graffiti grants grass green Green Corridor guerilla hack hacking Halloween hardware history house housing how to HQ ice ideas image inflatable infrastructure install installation inter-city interactive internet intervention interventions interview ironing knitting LCD Lebel LED light lights list lists magnetic magnets make making mapping maps materials math message michelles Michigan micro-residency mind map monitoring moss movie music naturalized area nature neighbourhood news newspaper newspapers New York new york city night noiseborder office hours open source opportunity paint painting paper parade paranoia park parking ticket parks participation party pedagogy performance perspective Peterborough photography PHP physics pixel planning plans plant planters plants plastic bags politics pollution presentation printers project projection projector projects psychogeography public public art public domain public realm public space public transit pulp radio Rain reading reblog recycle remote research residency resistors restaurant reuse ribbons river roof rope safety Sandwich Sao Paulo Save the City school science screening sculpture sculptures seed bombs seeds sign signage snow social practice software soil soldering sound Soundart space spray paint stencil stencils stickers story strategic plan street street art street art strike submissions suburb surveillance sustainability sustainable tags talk tea technology test tetris text Text In-Transit time-lapse tools Toronto transit transmit transplant travel tree trees tshirts tunnel tv university urban venues video visualization walk wall water Waterloo website wheat paste wildflowers Windsor youth youtube

Our Recent Research

Research Description

Broken City Lab is an interdisciplinary creative research group that tactically disrupts and engages the city, its communities, and its infrastructures to reimagine the potential for action in a collapsing post-industrial city.

Call for Submissions

Broken City Lab: Storefront Residencies for Social Innovation
The Storefront Residencies for Social Innovation invites the radical re-imagining of the possibilities in occupying a vacant storefront in the heart of Windsor for one month. Apply now!

Subscribe

Broken City Lab RSS icon Blog RSS

Broken City Lab RSS icon Comments RSS

Events

Sing to the Streets March 20, 2010, 3pm

City Share Conference in Chattanooga Feb 17 - 20, 2010

Sites of Apology / Sites of Hope Sunday, Feb 28, 2010, 1pm

Public Realm at Propeller Centre for the Visual Arts Jan 20 - 31, 2010

Save the City: Listen to the City Sunday, Jan 24, 2010, 8pm

» More Events...

Cross-Border Communication

Cross-Border Communication: We're In This Together
Cross-Border Communication is an interventionist performance series based on the desperate need to communicate with Detroit from Windsor.

Most Read Posts

Contact

info@brokencitylab.org

Bookmarks

What We're Reading

Links

Meta