I’ve finally got together all the pieces together to transform the mess of wires from my breadboard version of my twitterpop project into a nice reusable shield for my arduino. It’s only basic containing two 595 shift registers, and 8×8 common anode LED matrix and a few resistors but it does an admirable job. PCB designs and eagle files can be found on the twitterpop page. Thanks to the people at BatchPCB for doing a nice job on my PCB.
I’ve been waiting for a week or so to assemble this as I decided to order a fancy new Weller WS81 soldering iron to use rather than my aging 12W Weller 2012 which I’ve had for about 10 years, never has soldering been such a pleasure!
And in action (note the fancy base provided by oomlout):
At present serial communication from the Arduino IDE will not work with the default installation as the IDE is supplied with a 32 bit version of the serial communication library rxtx and as yet the version in the repos doesn’t work either.
A full distribution of the arduino-0017 ide can be downloaded here with the correct files included.
If you haven’t used arduino before you’ll need to install its dependencies by running
sudo apt-get install avr-libc gcc-avr avrdude
To fix an existing installation – a working version of rxtx (rxtx-2.2pre2-bins.zip) can be downloaded from http://rxtx.qbang.org/ however at the time of writing the site had been down for a while so I’ve provided a mirror of the file (here).
To install:
Extract /RXTXcomm.jar and /x86_64-unknown-linux-gnu/librxtxSerial.xo into the ardunio/lib directory overwriting the previous versions.
Arduino serial communication should now work as normal.
For people having more general problems with any application using librxtx-java on 64 bit ubuntu I have created an updated .deb file – available here. This can be also used to fix arduino if the librxtxSerial.so file is removed from the arduino/lib directory.
The hardware for the system discussed in my previous post consists of an arduino, arduino ethernet shield, 2x 595 shift registers and one 8×8 common anode LED Matrix from china via ebay. Basically the arduino requests the page containing the current popularity metric and then adds it to an array containing the states of the currently lit LEDs which is then pumped out to the shift registers to update the display. The circuit lights the correct LEDs.
The circuit design is based on a design featured on the arduino playground for lighting 8 LEDs but was slight adapted to deal with the matrix. The schematic can be found here.
I have also attempted to form this into a new arduino shield so I can reuse the LED matrix circuit quickly for other projects, a PCB is currently with BatchPCB
After struggling to get a bash script to send data from curl correctly to my arduino over serial I resorted to windows and found that communication over serial can be quickly achieved using the Powershell (the new cmd). I naively assumed it would be easier in linux than windows however the Powershell does seem to be quite a match for bash. I achieved what had taken me hours in Linux in about 10 minutes. The following example code shows the connection to the arduino and how to send data to any serial device This can of course be formed into a more sophisticated script or just run line by line:
$port= new-Object System.IO.Ports.SerialPort COM3,9600,None,8,one #opens serial port - adjust parameters accordingly
$port.open() #opens serial connection
$port.Write("Hello World") #writes your content to the serial connection
$port.Close() #closes serial connection
If you are not sure of the name of your serial ports then you can list them in the powershell:
After buying an arduino and some 8×8 LED matrices I really needed a project to make good use of them. At a similar time I also had become a bit addicted to twitter and had been reading up on the API with the intention of doing something cool with it,somehow these ideas all got rolled into one to give a twitter popularity meter. The system uses a PHP script to search twitter for a predefined term, #tag or @reply and then presents the result of this as a webpage with number of results. The page is then read by an arduino with associated Ethernet shield and displayed on a bar graph format on the LED matrix.