Archive for the ‘iPhone’ Category
RoboBrrd Food – Using the Redpark Serial Cable
Remember a while ago, when I was able to send data through the MFi SkyWire cable? It turns out, now there is a cable designed for hobbyists, with an SDK, by Redpark! They were very kind enough to send me a cable, so I figured that the first thing to try would be to feed RoboBrrd!
Here is a video where I explain everything in detail!
Here is a link to the code on Github!
What is next? For WWDC 2011 legacy sake, I will probably try to drive DOGCOW robot with the iPhone’s accelerometer. This time though, the cable would be attached to an XBee so that it will be wireless.
Logomotionator

Logomotionator is an App for the FIRST Robotics Competition 2011 that I created during the build season while helping out Team 296: The Northern Knights! You can download it on iTunes for free.
Here is the description of Logomotionator:
Logomotionator provides a way for teams to organize and collect their ideas about strategy and scoring during the 2011 FIRST Robotics Competition season.
Features:
- Fabulous user interface design
- Track the scoring for the red and blue alliance
- Up to 5 tubes per peg will be counted (in case some are deflated)
- Record which teams were on the alliances, their minibot scores and penalties
- View your saved scores and email them
- Draw strategic plays on the game field in red and blue
- Easily access the usfirst.org websiteThe FIRST Robotics Competition is a fantastic way to get youth interested in Science, Technology, Engineering and Math. Check out one of the regional competitions in your area to see what the future holds.
Inspiration for the App came about by the temptation of an Apple eMate 300 (an iPad of 10 years ago, basically)! I took in some feature requests and just started to work away at it. Making the calculator algorithm was fun
All of the coding was straight forward. I must be getting really good at making Apps or something. Making the game field drawing stuff was probably the part I most enjoyed:

I also really enjoyed the email stuff too:

The only rough spot was on the saved scores view, because the “Remove button” is actually in a different section, I have to replace it with an invisible cell when removing everything because of the protective UITableView cell math.

Once all of the functionality was there I wanted to make something that would really capture the energy that the competitions have. I figured it would have to look snazzy, so I paid close attention to detail when styling the App. On the iPhone 4′s retina display, the graphics look beautiful.
This is what the background looks like, I had a lot of fun making it!

This is my most complete App ever (so far). I really like the finished product. I can’t wait until after the season is over to go through some of the code with the programming students. It would be a fun exercise to break down the calculator algorithm!
I hope you enjoy it. There’s some more screenshots on flickr. Go download Logomotionator now! It’s free!
FIRST®, FIRST® Robotics Competition, FRC®, FIRST® Tech Challenge, and FTC®, are registered trademarks of FIRST® (www.usfirst.org) which is not overseeing, involved with, or responsible for this activity, product, or service.
Apps on the Desk
I have been coding up an App storm the past few weeks!

First off, I got an actual phone that runs the Android OS! The user experience is sort of meh, I guess it’s a personal opinion sort of thing. What they did on the Android OS was separate some functions out to the hardware. I have to admit, it’s a bit confusing to go from the mindframe of everything will be accessible via the screen to pressing actual buttons. The menu button is great, though.
Making Android Apps is done in Java (yay, my first language!) through Eclipse. It will be fun to do some of the advanced things on this platform, like Augmented Reality. I would love to Augment explosions, so you can blow stuff up with your mind (er, smartphone), without harming anything. Imagine how much more peaceful the world would be with such an App?!
Next, KiloWhatt a la iPad: Split Screen View

The split screen view is really important in iPad Apps. KiloWhatt, right now, is the only energy management App for iPad, so updating its Universality is quite important. Making split views is, of course, more tricky than it seems. There are some really bad gotchas that can get to you. The one that got me was auto-rotation, it was sneaky.
(You have to have autorotation enabled for all views).
All that is left in this version is to get all the information appearing, and make some popup view controllers. I missed the deadline for the App submission before Christmas, so I think I will work on this more for a few weeks to improve everything, like adding in the easy-peasy plist sorting capabilities.
Sorting data in Cocoa is breathtaking. Imagine you have a NSArray of NSDictionary…
-
NSSortDescriptor *dateSortDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"Day" ascending:YES selector:@selector(compare:)] autorelease];
HOW BEAUTIFUL IS THAT?! SERIOUSLY! IT TOTALLY DESERVES CAPS LOCK!
I also want to add in some Three20, Twitter, and Game Center.
Finally, the crazy particle kaleidoscope.
Kaleidoscope Particles iOS Cocos2d from RobotGrrl on Vimeo.

This is using Cocos2d for iPhone. It is amazing. This actually runs at 60fps on an iPhone 4, and rarely drops to 58fps. I was trying to use Core Animation for a lot of things, like a Crazy Stars revamped, but Cocos2d is definitely better to use. They have lots of documentation, examples, and friendly people on IRC who help you out.
What I want to do with this App is add in some Box2d, so that I can fling the particle around and it will be bouncing all over the place! It would also be really neat if I can add some satellites around each of the emitters. I really enjoy the way single pixels show up on a retina display, they are tiny and crisp, so it would be interesting to see those flowing around the emitters.
Special shout out to Ken aka Retro for sending me 20 chips that I can use as the biocore in BEAM robots! Oh, and these hilarious Robot Monkey tissues!

To finish off, here’s a nice photo I took a few weeks ago:

Canada Spirit!

Canada Spirit is now available on the App Store! Woot! It is a Free App, with an optional In-App upgrade. You can check it out here:
US: http://itunes.apple.com/us/app/canada-spirit/id394637853?mt=8
Canada: http://itunes.apple.com/ca/app/canada-spirit/id394637853?mt=8
The App has actually been complete for 3 months now, but there were complications along the way. It’s a long story:
For Apps that use In-App purchases, you have to have your App reviewed (without the In-App purchase capabilities) and rejected. This takes approximately 1.5 weeks. Not to mention, that you have to make the App without the In-App capabilities, which, depending on the complexity and time dedication, could be a few days. We’re already looking at 2 weeks waiting here.
Once your App is rejected, you can finally test the In-App purchase sandbox part of your App. SWEET. Add a few days for debugging. We’re up to a total of about 2.5 weeks used to be waiting here.
This is when the crazy part happened to me. For the In-App purchase, I selected the option “Canadian English” for the language. When my App moved to “In Review” (yesss finally!), they removed that language, which forced my In-App purchase to be in a “Developer Action Required” state- and thus no In-App Purchase approval. The whole point of submitting your App (without the In-App purchase capability) to be rejected was to get the In-App purchase approved.
For this, an additional 1.5 weeks were added. We’re already at 4 weeks here! >_<
Depending on how carefully you read the guidelines for the App Store, then you can be waiting about a month. That’s what happened to Canada Spirit. It got caught in the payment for hardware devices clause. This added another 1.5 weeks…
Once the App was resubmitted, the In-App purchase language options changed AGAIN. Luckily though this time the App Store review team actually contacted me and I was able to fix the In-App without having to go to the back of the line. YAY!
You have to have a lot of dedication to survive the App Store review process. Canada Spirit went through 6 weeks of poking and prodding just to get to you guys, so I hope you enjoy it
Post your screenshots of whatever photos you decorate on Flickr so that we can see them!
Also, sharing this story isn’t meant to be against the App Store at all. I still enjoy the App Store as a consumer and developer! It is to cast some awareness on the time investment you will have to make if you want to do some In-App purchases!
S7GraphView Zoom & Pan Code
Here is the code for the S7GraphView Zoom & Pan modification that I mentioned a while ago for the s7graphview iOS framework.
If anyone out there improves it more, please leave a comment!
Movable Graph – s7graphview

One of the pitfalls of core-plot is that it is hideous to try to interact with. Panning back and forth on the graph slows to a crawl. Zooming requires scaling down the whole graph, and is probably over-complicating the process. Plus, you can’t really add a title to the graph. In HS the teachers purposely take off “5 points” if you don’t have a title to the graph! I really want to do a good deed and help improve the graphing on iOS devices.
The s7graphview framework is really lightweight and does what it has to. Only problem is that it can’t pan or zoom. I took a look at the code and managed to move variables around to the right places to make it work. Check out the video:
Movable Graph Demo from RobotGrrl on Vimeo.
You can see a few bugs though, especially with the axis lines. Once those are fixed, I’ll be using this new graph framework in KiloWhatt and then releasing the updated graphing framework open source!
With some sample code for iPad and iPhone too.
Hopefully this will make graphing on iOS easier for everyone. In a couple of weeks I can’t wait to see more graphs!

CRAZY stars on App Store! :)

CRAZY stars is now finally on the App Store. If you have an iPad, go to itunes.com/apps/crazystars to play with the free App! ^_^
If there’s 1,200 downloads in 3 weeks, it will be released Open Source!
Enjoy! Let me know what you think of CRAZY stars!





