Archive for March, 2010

Arduino serial pain

Tuesday, March 30th, 2010

So I have been trying to make my newly acquired Arduino (mega) talk to this old 16×2 char, serial-interface LCD display I have.

This should have been fairly easy – you just feed the LCD ASCII over serial and it displays it. An Arduino can output ASCII over serial directly. Should be easy.

The short story is “its a bit messed up”. The slightly long story goes like this:

I started by trying to print the character ‘a’ to it. Logically I tried:
The display showed “0”. I also tried:
Serial1.print(97, BYTE);
Same result.

After a lot of scrabbling in the dark, I finally tried:
And got an ‘a’ character to appear.

Seems something is getting confused between DEC and HEX. I tried driving the LCD from my PC’s serial port and it worked as expected. I tried reading the serial data from the Arduino back into a serial port on my PC and it looked ok. But for some reason when I send the display DEC from the Arduino it reads it as HEX. If I try using the hex literal in the Arduino code:
I get ‘0’ on the display again.

I have probably missed something obvious somewhere, but I have no idea what. I have a backup plan that involves using some form of nasty conversion, but I would prefer to avoid it.

Morrigan alpha 3 somewhat delayed

Wednesday, March 24th, 2010

My current dev build of Morrigan has a lot of new stuff compared to the a2 release. In theory it now matches all major functionality of terra and I have indeed now migrated to using Morrigan as my primary media player. And for the most part it is going well.

I would really like to now make another release, but I am hesitating for 2 reasons:
1. So far as I know, the only people who are going to test it use Linux, and the Linux build has a load of what I would class as really annoying defects, listed here.
2. I keep finding more bugs. Fixed 3 more tonight.

But it is working quite nicely on XP. So in light of point 2, I will keep using it myself and resist adding new features (I need a brake anyway) until I have gone a good length of time (5 days to a week) without finding any further serious defects. Then I will package up what ever I have and call it “alpha 3”, regardless of the known issues.

I guess this is how all software releases end up – its about know that none of your existing defects are blocking and that no new issues are arising.

Not that I really expect anyone else to really care about Morrigan, and I say this without sarcasm or remorse. This project was never intended to be any more that an opportunity for me to upgrade terra and get better at developing an actual product. Oh, and to prove to myself that I could do it. :D