Hey Everyone! I’m a finalist in a competition on Wired’s GeekDad! The contest was to make something that could be laser printed at Ponoko (I highly recommend their service, by the way) and uses electronics from Sparkfun (also awesome). My entry is for a BART Display to show when the next trains are coming.
This is part one of my series of posts describing the Nokia N900 Contest I entered in the spring of 2010.
Links and info about our participation in the Nokia PUSH N900 Competition
Update As Edward Pain pointed out, the latest version of ASE (soon to be SL4A) changed the TTS and the way that dictionaries are called. I’ve updated this script to take these into account. Thanks Ed!
So I’ve been loving having the DROID around.Â I don’t even mind carrying a phone in each pocket because it’s totally worth it.Â My most recent obsession is the Android Scripting Environment (ASE)
Basically, it allows you to write code in high-level languages like python, bash, perl, etc, right on the device.Â This is when a physical keyboard is really handy.Â So I downloaded the app and started messing around with the included python scripts.Â I’ve never coded anything in python before, but I have programmed in a bunch of other languages, so it really wasn’t hard at all.Â By far the coolest pre-installed script was the Text-To-Speech (TTS) example.Â I’m not sure what it is about making computers/devices say funny stuff that makes me laugh so much, but its really fun.
I soon noticed as I was cracking myself up over making the DROID say things like “Then I put my hands up, they’re playing my song” that I’d really like the option to repeat what it just said.Â So I decided to code it.Â Please be gentle on me; I do not profess to be an expert coder, I just hack stuff together till it works.Â Any suggestions would be appreciated.
First thing I did was take the original code and wrap it in a while loop.Â This will repeat the phrase as many times as I like, as long as the condition remains true:
"""Speak user generated text."""
__author__ = ‘ Brett Peterson <email@example.com>’
droid = android.Android()
message = droid.getInput(‘TTS’, ‘What would you like to say?’).result
repeat = droid.getInput(‘repeat’, ‘Repeat? Y/N’).result
while repeat == "y":
repeat = droid.getInput(‘repeat’, ‘Repeat? Y/N’).result
So about a month ago I registered for the Google Developer Labs World Tour.Â They asked for the package name of apps we’ve developed, so I was pretty sure I wasn’t going to get in since I had just published my very first app.Â Well, last week I received an email confirming my seat!
On Wednesday I showed up at the Googleplex and headed to the building that was indicated in the email.Â Waiting in the lobby, I mingled with a couple other guys before we got to register and take our seats.Â I was so excited I was almost shaking! – almost
The Lab was really helpful; they first did an overview of the android platform, the mission and goals of the product and how we are fulfilling that as developers.Â It was all very motivational!Â I wanted to crank out some code right then and there.Â The speaker, named Justin, walked us through the stuff that’s new in Android 2.0+ and then the schedule mentioned a break before a code lab.Â Justin told us that the lab would focus around a new section in the SDK for 2.0 – bluetooth.Â Unfortunately, bluetooth isn’t supported in the emulator that we had all loaded onto our computers.Â “Sorry guys,” Justin said “we’ve only got a couple test devices, so we’re all going to have to share.Â You know what? Forget it, you’re all getting a DROID”
For a second it was pretty quiet; I think everyone was still waiting to see if he was joking!Â He wasn’t! Other Google employees started handing out boxes and marking our nametags when we got ours.Â I wasn’t surprised we got the phone because I had done my homework and heard that the other labs all got one, but man, it’s so fun to get free stuff!
So we all quickly opened our boxes and got to work activating and trying out the phones (well, i guess not everyone, I saw a few unopened DROIDs pop up on Craigslist the next day…)Â The lab was really useful and taught me the proper use for Intents and how these hooks can better integrate different apps.Â I felt a little behind; I would catch up right as we were moving on to a new topic, but it was great.Â I really enjoyed the entire experience.
Thanks Google for an awesome phone and for the free lab!Â I can’t wait to continue developing for Android.Â Look for new posts in the next few days as I enjoy finally having a physical device to test on!
Update: Here’s the link to the new Android Market: Points!
So I finally finished my first Android app.Â It’s called Points and it’s in the Market now!
This is a simple app and yes, there are others very similar to it already in the Market, but I wanted to make this more as a practice for me than anything else.Â So with this app you can enter the calories, grams of fat, and grams of dietary fiber for the food you eat and calculate the points value according to the most recent Weight Watchers Points calculations.
The function that sets my app apart from the other options in the Market is the fact that you can then add those points to a daily total.Â This way, you don’t have to try and remember how you’re doing for the day.
There will be some free updates coming, so please try out the app and send any questions/comments/suggestions my way!Â Leave Comments below for quickest response, thanks!
EDIT: you can use the barcode scanner app and download it directly to your phone.Â Just open up Barcode Scanner scan this:
and click “open with browser”.Â It’ll take you to Points in the Market.
Hello and welcome to SubmergedSpaceman.Â I’ll be using this blog mostly to document projects I’ve been working on and want to share.Â Thanks for looking!