Fixing Arduino Uno serial performance

Some of you might have noticed that Arduino becomes unresponsive or really slow to respond when it sends information using serial interface.

This can also lead to messages like “Serial port ‘/dev/ttyACM0’ not found.” when trying to upload new sketches to Arduino.

I noticed this years ago but never found a solution because I always somehow managed to get it working after many upload retries and I could not find any information regarding the problem.

So, yes, it was a firmware problem and you can fix it by flashing more recent firmware that can be found here.

And instructions on flashing it are here.

LED controller (with Arduino, RaspberryPi and WebSockets)

I haven’t posted here for a while so I figured I’d write about this little project I made some time ago.

I’ve had an aquarium for some time but it had no lights so it didn’t look that cool during the dark time of the day.

I had an old Arduino Uno lying around from times before RaspberryPi and it just so happens that Arduino has 5 PWM output pins and I only needed 3.

rjb_all

I connected a single RGB LED and a couple of white LED’s (which is enough to light a small aquarium properly) to the Arduino and made the program use serial connection to send and receive JSON formatted data.

276dbbe0a49111e280cd22000a9f18de_7

Then I connected Arduino (using USB) to my RaspberryPi that I use as a home server and wrote a Perl script that connects to Arduino’s serial port (using IO::Async::Stream).

IMG_20140118_214635

The Perl script creates a WebSocket server (using Net::Async::WebSocket::Server) that allows realtime control of LED’s and color modes from a web browser.

2014-01-19-111507_456x524_scrot

In the future I could tweak it a bit more and bring back the scripts that I used to switch on LED’s based on events from IM clients (Pidgin/Skype) or E-mail but at the moment I’m happy with it as it is.