iRobot Corporation

Create General Discussion
Register  ·  Sign In  ·  Help
Jump to Page:   1
  Reply   Reply  

Morse Code Generator for Command Module
Options    Options  
jpq
Newbie
Posts: 1
Registered: 06-14-2009


jpq

Message 1 of 1

Viewed 1,295 times


I put a similar message over on the googlepages site, but I thought I'd put it here as well. 

 

I've just started working with the Create and the Command Module and am exploring its capabilities. I currently don't have any other sensors hooked up to the Command Module, but I needed to start getting feedback from the program. I didn't have an LCD handy and for other reasons, I want to try and do as much without adding external I/O as possible. So, I wrote a morse code generator for the create/command module combination. I looked around and didn't see anything like it on the WWW. It works like this:

1) I used 14 songs to encode all dit-dah combinations from DIT to DAH DAH DAH. These songs are then either letters or morse code letter fragments.  The encodings are in an initialized array to minimize memory space on the Command Module. This way all morse code letters are encoded either as one song or playing two songs back to back. There is another array which encodes the delay length that the Create module needs to wait after sending one of the partial fragments of the morse character.

2) A similar array was created that maps the characters A-Z, 0-9, as well as select punctuation to the two songs needed to create that letter.

 

I then use sprintf to print messages to a buffer and then call a playmorse function to listen to the message. It works well when debugging code and reporting on the states of variables.

Very shortly, I am going to start "taking data" on the Create's motion using my digital camera in movie mode and by having the feedback in morse, I intend to capture reports from the Create in the audio portion of the file for later analysis.

 

Cheers, John

07-02-2009 05:02 PM
Jump to Page:   1