Friday, May 9, 2014

RaspberryPi: Tweeting in Morse Code

It has been months without any idea. With RaspberryPi and my recent interest in Node.js and no interesting ideas around. I decided do a simple project just for fun. Here was the plan:

Listen to the tweets on particular topic, keywords, and from specific users

Convert it to Morse code

Emit the code from sound (beeper) and light (LED) source.

Make it testable without RaspberryPi and offline (using Telnet)

So, I wrote a Node.js based code which can be downloaded from my Github repository naishe/tweemorse the code basically does the following stuffs:

Based on what parameter you passed it either starts to listen to Twitter for the keywords and users that you have configured; or it launches a Telnet server on port 23 where you can sent it a message, and it will translate it.

Once the message arrives it is "queued" in a message queue for processing.

There is a queue consumer that takes the messages one by one and converts them into Morse code.

This Morse code gets read character by character "dit" or "dah" or "white space". (You may know more about Morse code from this Wikipedia article.) Based on the character, the output pin is sent either a HIGH or a LOW signal. Here is a rough idea:

dit: short HIGH

dah: long HIGH

transition between two characters: short LOW

white space: long LOW

HIGH means LED and and beeper on, LOW means they are off.

For more details and instructions look the Github repo. And, finally, here is how it looks when I tweeted a SOS:

We are leading Mumbai Escorts Agency that enables you to access our independent mumbai escorts girls to fulfil your all erotic feelings. We understand your all imagination and thoughts. We have top and good collection of escorts in mumbai. We are genuine and trustworthy escorts service provider agency in mumbai. we provides incall and outcall mumbai escorts service and memorable escorts service in mumbai so don't wait just contact us and book your escorts for fun.

Call Aisha +91-9966439067, High profile Hyderabad escorts girl Aisha, hot and sexy service offer for you, she is Independent Hyderabad escorts girl, I am student of final year Hyderabad and Hyderabad escorts service offer 24 hours.

We are a reputed and well established female escort agency. Since our agency does recommend the most stunning, attractive, sexy and young Mumbai Escorts for our clients, our agency is well known and highly recommending escort agency in Mumbai.

Rejuvenating and relieving Mumbai escorts services will be given by our escorts with their adroit hands as they know what gratify you precisely. They are enough feasible to mould as per your requirements to get served.

We provide Pune escorts service knowing the demands and preferences of the clients. Our Ahmedabad independent escorts belong to the highly reputed agency which helps in finding the best stunning and sexy independent escorts Ahmedabad.

Heavenly beautiful, and having voluptuous figure including scintillating appearance, our independent Pune Escorts will give you the unimaginable and incredible pleasure that you never have in your life for sure. Let us have you for a moment and get served.

If any guys want to take adventure and full enjoy a lots of with any of girl without hesitation and you are seeking a beautiful, charming, decent Mumbai escorts then you can contact Mumbai escorts fun. The Escorts agency have so many extra hot, sexy, open minded and delight female escorts in Mumbai who are represent full experience with her client and she will full them one night life unique pleasure and sex.

Mumbai escorts promises you to providing you the 100% genuine and erotic and unique services all over the IndiaSaloni Verma Escorts is one of the famous Escorts Agency in India, offers hot and sexy escorts in Mumbai.Mumbai Escorts

Jodhpur call girl number from our most trusted Jodhpur Escort and Jodhpur female escorts service are provided all over Jodhpur. We provide High class call girls, models, college girls, Russian girls and House wives for sex.

Udaipur Hi Profile escorts, Escorts In Udaipur service to enjoy real fun VIP class Udaipur escorts. Feel the love with our hot girls at the reasonable rates. Escort Service in Udaipur is a 24*7 timeline. Independent Escorts in Udaipur, you should hurry up to Book Nights. Udaipur Escorts is truly had a different carriage and sense from the female escort service.

Sonia Verma independent Bangalore Escorts Services for heavenly pleasure and contentment of body and soul. She has beautiful curves and poses

Hi guys if you are want to remove your body satisfaction then you can choose High Profile Hyderabad escorts service, They are most beauty collection only for genuine guys, collection is college girls, House wife, Russian models, air hostess and south Indian actress, service is like as Hyderabad escorts, escorts in Hyderabad, Independent Hyderabad escorts and Hyderabad escorts agency.

Hey guys, I am asvi sain from call girl in ahmedabadVadodara Escorts Serviceahmedabad escorts service , I am a independent female service, i a have a attractive body for fun and enjoyment. http://asvi.in/http://asvi.in/independent-vadodara-baroda-escorts-service.htmlhttp://asvi.in/independent-rajkot-escorts-service.htmlhttp://asvi.in/independent-mount-abu-escorts-service.html

For the simplest of Escort services in state welcome to the planet of fun n frolic and acquire the foremost pleasure out of our decision women in state. people that ar tired, tired and exhausted from the times of diligence ar those UN agency would like the foremost of our servicesgoa escort,goa escorts,goa escort service,call girls in goa,

We have the most excellent and wonderful female Escorts in Delhi who have very seducing behaviour with well-maintained figure. All have very good-looking corpse and to maintain such body, all lovingly practice yoga and exercise on regular basis.

The tag of best developer in Delhi NCR does not come easily. As a matter of fact, every behemoth essentially has to toil to touch this mark. So, book with this developer to gift yourself a wonderful home.

Coimbatore is one of the cities of Tamil Nadu. Coimbatore call girls are always ready to provide you intimate services that you will find more than Independent Coimbatore Escorts. Her involvement in your life as your temporary intimate companion will keep you satisfied until you meet the real one. Coimbatore Escorts Service. what you need to do is approach a beautiful and glamorous yet professional intimate companion with whom you can talk, share your feelings with and of course enjoy what you actually want from so hot and beautiful partner.See more at: http://day-night.in/

Hyderabad Escorts you get every kind Models and forthcoming models. Models like Russian, Japanese models, Indian models, etc. of these special things are for selected models. That means everyone seems to be prepared for the sex. Russian models Escorts Hyderabad one specific issue he ever traditional to not obtaining a full-time partner. All- time client solely has hot. The time can stay with the client, the client can Enjoyments at that point. Hyderabad wonderful escorts are part of a sweet sensual god gift service that for surely stands come in the crowd. Hyderabad Escorts Service great enlist some those women who are talented service master with numerous years of knowledge in this field. She has mixed collection sexual back up in this agency. Simply feel her most loved back rub alongside her extraordinary and unmistakable innovation.http://ess-star.com/

24 Hour offers sexy Hyderabad Escort service girls for high class VIP peoples in town. Meet real high class independent Escort girl Avani. Our Hyderabad Escorts Girls are here for all satisfaction. The most popular Hyderabad escorts! ideal girl for initiates romantic relationships are available 24/7. We have sexy and best Escorts in Hyderabad at very low rates.http://avaniescorts.com/