News of The Wolf

Random, hopefully interesting technical ramblings

Posts Tagged ‘serial’

Twitter Popularity Meter – Hardware

Posted by chemicaloliver on 07/10/2009

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.
schematic

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

Advertisements

Posted in Electronics, Internet | Tagged: , , , , | Leave a Comment »

Twitter Popularity Meter – Code

Posted by chemicaloliver on 06/10/2009

Recently I’ve been working on a popularity meter which searches twitter and displays a bar graph of the popularity of the search term on an LED Matrix driven by an Arduino. It currently relies on a PHP script on my webserver to do the actual twitter search and the arduino reads the page via ethernet and then displays the number on it bar graph.

Arduino Twitter Meter

Arduino Twitter Meter


Read the rest of this entry »

Posted in Electronics, Internet, Programming, Software | Tagged: , , , , , , , | Leave a Comment »

Powershell and arduino serial communication

Posted by chemicaloliver on 25/09/2009

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:

[System.IO.Ports.SerialPort]::getportnames()

Posted in Programming, Software | Tagged: , , , , , , , , , , , | Leave a Comment »