Arduino Hack Weekend

December 4, 2011 at 6:22 PMRampidByter

I did something a little unusual this weekend. A few friends and I decided to have a Arduino robot hacking event. The goal of the event was to use all the same hardware and sensors then put together a robot capable of performing basic line tracking. Since we all started with the same hardware we could put together robots of equivalent capability, and the challenge would be to build and program a robot that would outperform the others.

I took some pictures of the event and figured I would share what happened.

I started with a grab bag of wires and IR sensors with the Arduino Uno board. My first task was to put together the dual motor gearbox for the treaded drive system. Pictured is the assortment of parts/sensors/wires in bags, the gearbox, and the Arduino Uno.

WinMoPho'er_000155

My two friends were already hard at work piecing together their robots.

WinMoPho'er_000157

This is a post-build picture of the gearbox that is driven by dual 6V brushless motors that will power the treaded robot.

WinMoPho'er_000158

After mounting the gearbox and assembling the platform with the treads the structure of the robot is completed. At this point it all comes down to assembling the Arduino Motorshield, wiring the motors, soldering the IR sensors, running the connectors, and programming the robot.

WinMoPho'er_000159

The platform with the flip-up electronics base.

WinMoPho'er_000160

In order to power both the 6V brushless motors I first had to quickly solder together the Arduino Motorshield.

WinMoPho'er_000161

After soldering together the Arduino Motorshield I simply attached it to the Arduino Uno board.

WinMoPho'er_000164

Next came soldering the positive/negative terminals on both the 6V brushless motors, and inserting the motors into the gearbox while running the wires out to connect to the assembled Motorshield.

WinMoPho'er_000167

After getting both the platform and Arduino board configured next came soldering the connectors to the four IR sensors that would be responsible for sensing the line.

WinMoPho'er_000169

Once the IR sensors had the connectors soldered, wires connected, and were attached to the underside of the treaded robot platform.

WinMoPho'er_000178

The finished Arduino powered treaded robot!

WinMoPho'er_000179

At the end of the evening there were three equal, but very different Arduino powered treaded robots. The robot to the very right was the first prototype of the robot configuration, and has been much experimented upon with the addition of both bump sensors, speaker, and a multitude of other sensors.

WinMoPho'er_000184

The first robot to successfully complete the course and on the very first try!

WinMoPho'er_000173

Just watch it go!

WinMoPho'er_000174

 

It was simply awesome watching something built in a period of a few hours going from miscellaneous plastic parts to a robot functioning on its own performing actions that even we didn’t know what would happen. For little under $200, a few burned fingers, and a ton of cheering we had an amazing moment where it felt as if anything was possible. We’re already formulating the next challenge that will be built upon the framework we’ve developed for this first challenge. What an exciting night.

Posted in: Programming | Computer Hardware

Tags:

State of Mobile Development

August 7, 2011 at 1:30 AMRampidByter

After spending six weeks building a mobile site for my current employer I had the chance to really get a sense of where mobile development is and a bit where it’s headed. The project itself was built with ASP.Net MVC3 along with jQuery Mobile and was meant to provide an iPhone-less experience. During the development I touched on Sench Touch, PhoneGap, and collaborated with both the Android and iPhone developers on staff to mimic the available functionality.

Unfortunately for me I happened to pick the time to develop the site using jQuery Mobile Alpha 4 and three weeks after launch the Beta was launched. In hindsight I think it would have been a better effort to develop the site using media queries to style the pages. jQuery Mobile is nice but the Ajax handling of page requests can cause some undesired effects. It’s a wee bit cache happy. The experience either way was very enlightening.

The takeaway from the experience was this. Mobile sites are slow, unreliable, and are a giant cluster when it comes to developing a consistent experience across multiple mobile OS and device manufacturers. Android browsers for example on 2.0 to 2.2 experiences vary widely. Even using the same Android 2.2 OS on the Motorola Droid X and HTC Thunderbolt handle mobile sites differently. HTC Thunderbolt has a fixed large network request buffer much different than that of the Droid X causing page requests delays. HTC Desire has an interesting virtual keyboard quirk when typing secondary characters. The keyboard enters the standard key and upon selecting the secondary key deletes the original character and replaces it, but it doesn’t always happen resulting in two characters being entered. Don’t even get me started on Windows Phones or Blackberry OS 5 or less.

It’s also difficult to get a true sense of our user experiences across different networks regardless of device. This is the biggest complaint I have against mobile development. I keep seeing newer phones released with dual-core processors, bigger screens, but they’re all still neutered by the worse than dial-up bandwidth. If the mobile device is on WiFi the device may act relatively well, but if the user is out and about on the AT&T or Cricket network the experience could be drastically different. Ajax has helped web pages come a long way to feeling as responsive as desktop applications, but the moment a chatty site moves to the mobile realm the proverbial shit hits the fan. That gets into the biggest disadvantage a mobile site has versus native apps when dealing with suboptimal bandwidth. Local storage.

Local storage enables the iPhone or Android applications to retrieve data, store it, and then use it for whatever the application needs. For example maybe the application requires a list of financial transactions, and then to allow the users to sort/filter/and view individual line item transaction details. For Android and iOS the transactions can be requested, stored, and easy as pie used for their purpose. Mobile websites are not afforded this luxury. For mobile sites the list of transactions are requested and besides session, storage is limited. Even rendering a large amount of transactions in markup, regardless of latency in retrieving the data, can cause massive delays. For what could take the iOS/Android OS native applications 10 seconds to retrieve, display, and enable interaction could take upwards of a minute or more on a mobile site just to render.

Looking at it again with the new perspective, knowing full well that more smart phones are sold than PCs, it’s saddening where the state of mobile development remains. The landscape is rich with a bevy of powerful mobile devices and many promising mobile operating systems. Still, each and every single one of the devices rely on a communication structure that provides the same experiences that desktop PCs had ten years ago while using dial-up. Sure, there is 3G/4G but coverage is limited, devices capable of using those connections are not as wide spread, and even device configurations (screen size/ touch capability/ browsers) are as numerous as stars in the sky.

In the meantime mobile website development using media queries can be perfectly adept for displaying static content that mostly works on most modern mobile browsers. Native application development still makes the most sense until high-speed mobile bandwidth is provided and hopefully without bandwidth limitations. AT&T you suck by the way. PhoneGap goes a long way to help alleviate the pain of having to master Object-C, Java, and puts focus back on HTML/Javascript. Not every developer is a polyglot programmer, but most developers have at least a familiarity with HTML/Javascript so this makes natural sense to adopt.

Posted in: Programming

Tags:

MacBook Air Development Headache

December 30, 2010 at 8:22 PMRampidByter

It’s been nearly two weeks since my MacBook Air arrived and I have used it almost exclusively. I bought and setup Parallels 6. I created several Windows 7 Ultimate templates with Visual Studio 2010 Ultimate, Office 2010 Business, and used all my remaining licenses in the process. The VM template was given 60GB of hard disk, 2GB ram, and two cores.

I took it to work and setup a cloned VM as my client development machine. Everything worked better than expected. The MacBook Air built the massive client solution in two minutes and 38 seconds. The previous HP i3 machine with 4GB ram built the solution in just over four minutes. A true testament to the power of the solid state disk if I ever do say so.

Then problems started. First the machine started to freeze. From freezing it went to displaying the power sign of death. Within the first week it crashed five times. It varied from power screens of death, freezing, and even one blue screen within my Windows VM with a “Memory Management” problem. Started to suspect bad RAM at this point, but being new to both the OSX and Parallels I couldn’t tell whether it was hardware or fake hardware causing the problem.

This past Sunday an upgrade was released to Parallels 6, and I’d hoped if it was Parallels maybe it’d be resolved by the update. Unfortunately the upgrade didn’t help resolve the crashing. The crashes were random without being reproducible unless you count when I was in the programming groove it seemed to pick those moments to die. Luckily the MacBook Air boots in no time flat, and I can get my VM to boot relatively fast for a Windows machine.

I ended up contacting Apple support’s fast lane to schedule a service call. Last night I spoke to Cody, the Apple support rep, and booted the Mac to the hardware test utility running off the reinstall thumb drive. The quick hardware test proved to have no known problems. The extended hardware test was run three times in a row. Unfortunately it showed no signs of problems either.

At this point it seems there is no hardware problem, which leads me to believe Parallels 6 is the protagonist in this hardware play. Several other developers at the client site are using MacBook Pro’s with Parallels 6 without any incident. As far as I can tell it seems Parallels 6 does not play well with the MacBook Air. I’ve been researching any known problems (Apple rumors I should say,) and came across several kernel panic threads. The threads were related to first generation Nvidia 320M drivers on the Air. Considering that the Air doesn’t have discrete graphics memory it’s possible the combination of no discrete graphics memory, first gen drivers, and the strain of running Parallels causes a triangle of disaster.

For now I just have to live with the looming crashes, interrupted workflows, and the lost trust in my $1,800 development machine.

Posted in: Hardware | Programming | Mac

Tags:

MacBook Air Development Machine

December 21, 2010 at 10:33 PMRampidByter

A few weeks ago I started the search for a new replacement laptop for the Sony I sold a few months ago. I started by going to the nearby Microcenter and testing the usability of each laptop in the store. I had several make or break criteria I would not budge on. The criteria is below for reference:

  • Trackpad centered horizontally
  • Trackpad doesn’t move cursor while I type when brushed
  • Laptop shell not blindingly glossy (looking at you Toshiba)
  • Vent ports on the bottom of the laptop don’t get blocked by resting on legs
  • Touching the bottom of the laptop doesn’t burn my hand
  • Power cable plug doesn’t wiggle inside the socket
  • Power cable must be longer than four feet (Sony power cables SUCK)
  • Must have a low profile case easily used on the couch

 

Shockingly enough only three machines passed this criteria. Asus, Acer, and Apple. Of the three A’s the Asus was by far my favorite. The G series Asus machine with the flat black case, and back vent ports with luke warm bottom set it apart from the rest. The Acer unfortunately had too small of a trackpad where the mouse buttons seemed half the size of the touch area. The only problem with the Asus was the backlit keyboard from an angle shined light from the sides of the keys, and it weighed roughly 12lbs. It was 17” and wasn’t available in the store in a size I felt I could use comfortably on the couch.

The MacBook Pro laptops were nice, but the edges around the laptop were sharp. It felt like it would be painful to use while resting on my lap. The MacBook Air ended up being the all-star of all the laptops I tested out. The trackpad was perfectly centered on the case, it didn’t move my cursor while typing even though it was nearly twice the size of any other trackpads, and the laptop was incredibly cool to the touch. The slim profile of the device made it seem perfect for couch based use, and it weighed 2lbs compared to the 11lb Asus.

I wasn’t totally sold on the specs of the MacBook Air. The low powered Core 2 Duo and lack of discrete graphics memory wasn’t exactly a strong point in my opinion. Still it was the ONLY laptop that matched the majority of my requirements. I ended up checking around StackOverflow for anyone else using the MacBook Air for development, just to make sure I wasn’t crazy, and found a few posts about people doing just that. It seemed for the most part to be a decent machine given it’s limited resources.

I ended up ordering a MacBook Air last week. I ordered the 13” with the 2.1ghz core 2 duo, 4GB Ram, and with it came the larger 256GB flash drive. I installed Parallels and setup a development template with Windows 7 running both cores and 2gb Ram. It rated a 4.4 in the Windows Experience Index. Not too shabby considering the HP I use at work is an i3 2.4ghz with 4GB Ram and 512MB discrete graphics memory only rated 4.9.

After running Visual Studio 2010, Office 2010, and an assortment of other development tools within the Windows VPC while listening to podcasts via iTunes running on the Mac I can safely say the system holds up. Compile times on the VM were even faster than the HP running the same large solution natively. I believe the SSD had a lot to do with that fact as the hard drive rated 7.6 out of 7.9 on the experience index on the MacBook Air.

There is one thing to note though. I had a Mac screen of death earlier today after leaving the Mac for 30 minutes to attend a meeting. On returning I went to send the alt-ctrl-del command to unlock the Windows VPC, and received a giant power dialog instructing me to shut down the system. It was a bit odd, and a little disconcerting.

As I type this post from the couch on a Windows VM I have to admit this laptop is quickly growing on me. I literally have the best of both worlds, and don’t seem to be sacrificing anything more than the arm and leg it took to purchase it. I’m definitely glad I had the sense to upgrade the laptop with the faster processor, maximum Ram, and larger hard drive space. I have already used more than 100gb of space after setting up XCode, iPhone/Mac SDKs, and three basic .Net development systems.

Posted in: Hardware | Mac | Programming

Tags:

Windows Phone 7 App Hub

December 5, 2010 at 5:10 PMRampidByter

Last week I ended up getting up at about 3:30am and couldn’t sleep. So I did what any self respecting nerd would do. I went upstairs, opened up Visual Studio, and started making my first Windows Phone 7 program. I really wanted to create a program to be able to read the Mac address and display it easily from the phone. I quickly realized that the Silverlight functionality available on the phone is incredibly limited. By incredibly it’s really very pathetic. I would say it’s the most closed ecosystem of any mobile phone on the market, with exception to BlackBerry, but even then I haven’t dived into BlackBerry programming since the 8000 series.

It was fine enough to be able to use the emulator for phone development, but since I have a real phone I wanted to dive right into using things I create directly on my device. That’s when I discovered the App Hub. It’s basically like Apple’s development program where you have to pay $99 plus tax to join their little programming community/marketplace. With that cost you you are entitled to exactly one year of membership, and access to using a development device. This is where Apple and Microsoft take a sharp turn away from each other. With Apple it’s a one time yearly fee for complete access to the marketplace, documentation, code development environments (Xcode), SDK’s, and ability use development profiles on your physical devices. Microsoft on the other hand requires a background check to even get started. Microsoft didn't mention this until AFTER I paid them.

I failed the immediate background check. This is the second time I've failed to prove that I am me. It was asking questions related to my mortgage bank, my student loan bank, and what my monthly mortgage rate is. Well, first the mortgage bank list didn’t display my bank, my student loans were paid off/bank not listed, and none of the listed monthly mortgage rate range were even close to mine. Instead of a quick check it’s turned into a week long wait, having to fax a copy of my drivers license, and just today was granted access to start using my device for programming.

Talk about a buzz kill. Nothing like waiting a week with NO status updates to kill my enthusiasm. First the device is incredibly limited in access to physical functionality, and then jumping through hoops even to use the device I paid hard-cash to own really just puts it over the top from being sad to pathetic. Still, I am happy to see they finally agreed I am me, and now from this day forward I actually feel the $100+ dollars I paid to get denied was at least worth _something_. I’m hoping to push out a few project ideas and at least get a bullet point on the resume that I’ve made Phone 7 applications.

Posted in: Microsoft | Programming | Windows Phone 7

Tags:

Windows Mobile Phone 7 – The Good, Bad, and Ugly

November 25, 2010 at 11:52 PMRampidByter

After getting a first hand glimpse of the Windows Mobile Phone 7 from a buddy I just couldn’t contain my desire to program on the new platform. I’ve been slowly drifting away from Microsoft since the introduction to iPad development, and especially after having been burned so badly by the brick that was my Windows Mobile 6.1. Two years of servitude to the stylus will make anyone a bit skittish to get back into the mix. However, the newly intuitively designed touch sensitive interface really showed me that Windows Mobile had changed, and maybe this time it really would stop beating me at night.

Later that night I happened to be cruising around on Amazon looking for some decent study guides for future exams, and happened to note Amazon had a beta wireless.Amazon.com. Man, what a mistake to click that link to see the Windows phone offerings. Not only were the Windows Mobile Phones listed, but they were only $49.99 with new contract sign-ups. I still haven’t seen my willpower since that moment in time, and I think it left me for good this time.

Two days later my new Windows Mobile Phone 7 was at the door, and a crisp clean gorgeous Samsung Focus was unboxed. Instantly I knew this was the phone for me. The display was epic, the finger tracking was tops, and the fluid OS sealed the deal. I realized then I had made a good decision, but also a two-year pact with the devil (AT&T) but that’s another story.

After having spent the better part of last weekend out of town I had ample time to study, delve into phone functionality, and really get a sense of total device functionality The first thing I noticed was how heavily tied to social networking this phone is. The integration of Facebook/Live/Gmail contacts is astoundingly good. Albeit a little confusing trying to manually import my old contact list to the new phone. There didn’t seem to be a clear cut ‘add contact’ flow. The contact list was initially created from my Facebook friends list, live messenger contacts, and when adding phone numbers the phone asks to append details to the contact. This indicates to me these contacts are co-dependant on my current friend or buddy statuses. I'm not totally sure whether they’d be removed from my ‘People’ list if i dropped them from Facebook or messenger accounts.

The entire weekend was one big love fest with the device. I don’t think it left my hand for more than an hour or two, and at that point was either on my lap or at the charger. Don’t even get me started on the Zune device management software. Talk about making iTunes look like something straight out of the early 90’s. Seriously, iTunes is a pile of crap comparably to how fluid and well thought out the Zune interface software is. Somehow Microsoft managed to make the act of syncing look cool.

I didn’t really run into the negatives of the phone until I got home and tried to set the phone up on my wireless network. It was a disaster. I try to run a tight ship on security around my house, and especially with wireless access. I use a three stage approach, first I disable SSID broadcast, I require a connection password, and I use Mac address filtering. To say I was shocked to find that the Windows Mobile Phone 7 doesn’t display a Mac address anywhere in any settings would be an understatement. It’s nowhere. I spent close to an hour examining every single menu, setting, and poking in places I knew it couldn’t be. Turns out I wasn’t crazy, for now, and Microsoft didn’t include support to display the Mac address. On top of that the phone can’t see SSID broadcast disabled networks, and does NOT include support for manually adding the network to the phone. The solution? Enable SSID broadcast, turn off Mac address filtering, allow the device to connect, and then get the Mac address from the LAN device connection listing. Considering this device is targeted to business users try talking a bank’s network admin into that one.

The next problem I had ended up being with what I was most excited about, the Xbox Live integration on the phone. Before I knew what I was doing I setup my phone to use the Live account my MCP credentials are associated with. It then created a temporary XBox Live account under that Live account. That is NOT the same Live account my actual XBox Live account is associated with. There is no obvious way to change the associations on the phone, and instead requires going to the ‘Edit Profile’ settings for the auto-generated account. Once in the edit profile area you have to scroll all the way to the bottom, past the form entry fields, and there is a link on how to change the Live account the XBox is currently using. Ok, I can try that, but kind of annoyed the phone isn’t the one that can be changed. The saddest part is the XBox Live account steps provided by the phone show the pre-Kinect XBox update menus. Not entirely accurate account management menu navigation instructions, but none the less I found where I needed to go and followed the steps from there. After OK’ing the change on the XBox to use the Live account my phone is using my XBox instructs me that I cannot change the Live account it’s associated with because the one on the phone already has has an account. Seriously? I tried it twice to the same results. At this point I have some auto generated ‘PlayerXXXXXX’ account, and no way to get my gamer tag information for my real XBox Live account.

The remaining problems are more nit picking (so far) than anything else major, and could be from my past year of using primarily Apple interfaces. It has to do with the cursor displayed on finger press to navigate blocks of text. That is where iWhatever kills Windows Mobile. The cursor appears and the first thing to note is how incredibly distant it is from your actual finger whereas with Apple the retina display appears at least at your finger tip. The next thing you notice is how incredibly jerky the cursor behaves when it actually gets focus within the text block. It takes a surgeons dexterity to get the dang thing moved between a character and a trailing period. Good luck if you’re in a moving car. Seriously, it’s horrible, and makes me really wish I had a physical keyboard to overcome how terrible it is.

Still at the end of the day for all the negatives (so far) the device really stands out. The interface responsiveness is what amazes me the most. Coming from a web background I can’t help think it looks like like someone threw a bunch of floating divs with fixed width/height styles with solid background colors. Really though it’s the small things that amaze me the most. When I scroll through the main category list the bunching of the boxes when I try to scroll too far, or when I flip my thumb sideways and the top panel just folds out of view. Simple but oh does it make such a difference to me. Even when the wallpaper (if you call it that) needs to be slid upwards to view the menu options is simply an aesthetic wonder. I sat slightly sliding it upwards just enough so it would fall back down for at least ten minutes. When it comes to actual applications don’t even get me started on how neat the panorama display is. Its noticeable after years of navigating an iTouch interface that my thumb isn’t bent nearly as often to press or move around. I just slide my thumb from left to right and things just happen. It’s just the way you physically interact with the device that really stomps the competition. It’s much more… for a lack of a better world ‘useable’.

TI LaunchPad Development on Code Composer Studio

September 27, 2010 at 12:53 PMRampidByter

I finally received my TI LaunchPad after waiting three months for delivery. I popped onto the TI Wiki after getting the device installed, and then installed Code Composer Studio 4.1.3.0038. Since that point I followed the “LaunchPadSimpleProject.pdf” step-by-step to create my first MP430G2231 application with blinky LEDs. It was all going well until Code Composer Studio decided not to allow debugging.

Unfortunately it seems Code Composer Studio can’t seem to decide whether it is licensed or unlicensed. Working on the code the studio is licensed, but the moment I go to debug It brings up the license dialog. I browse to the license file, and the dialog closes to pop up an error dialog of no feature found for CCS_CONNECTION_ALL. Inspecting the license file there is no definition for the CCS_CONNECTION_ALL, but at the same point in time none of this was specified in the simple project nor license installation.

Until I get a solution for this my launch is aborted.

Posted in: Hardware | Hobby | Programming

Tags:

Cincinnati Day of Ruby 2010

September 23, 2010 at 8:27 PMRampidByter

I’m a little late posting about the event, but I attended the 2010 Cincinnati Day of Ruby event. The first half of the day was spent being introduced to Ruby Koans, and the second part of the day was taking a running jump at Ruby on Rails. I can safely say that Ruby Koans is hands down the best way I’ve ever found of learning a new programming language from scratch.

If you’ve never seen the Koans it’s basically a single program consisting of several Ruby files each consisting of testable blocks of code. Within each code file are multiple fill-in-the-blanks unit tests requiring the user to fix in order to move onto the next broken section of code to complete the Koans. You begin at the core aspects of the language, simple data types, exceptions, functions, classes, and so on. It’s really a bottoms-up approach to learning a language where you gradually expand your understanding in a test driven manner.

Ruby on rails I won’t touch with a ten foot pole at the moment. That was a walking disaster for anyone on a Windows machine. Luckily I had the forethought to bring my Ubuntu netbook. Still my only complaint against Ruby in general is not so much with Ruby itself but with Ruby’s other frameworks. The language is neat, and Nil is an object not actually null as we know it. How cool is that? Anyway, I really enjoyed the event, and have a greater understanding of Ruby because of the event. Win win.

Posted in: Programming | Ruby | User Group

Tags:

StgOpenStorageEx .Net C#

September 19, 2010 at 12:37 PMRampidByter

Sometimes I think my attention span is consistent as a cat faced with a dot or red light on the carpet. Luckily it often leads to some very cool rabbit holes. I ended up digging into file properties on a whole new level, which are a lot more complicated than I once thought. Long story short I ended up meeting the StgOpenStorageEx function, the IPropertySetStorage, and of course the IPropertyStorage interfaces.

I spent two days of exhausting search referencing through MSDN on structs, enums, and function declarations. Countless C++, .Net code forums, and even a Delphi coding sites looking for working examples of reading file properties. Most were filled with examples that didn’t work, or were postings of unsolved errors. I ran into many errors ranging from “E_INVALIDARG” of the IPropertyStorage.ReadMultiple function to the time spent building the classes required. Turns out PInvoke.net and most other sites all have invalid function declarations in one way or another.

All the trouble could have been saved by simply using the “Microsoft.VisualStudio.OLE.Interop” assembly to get access to the fully flushed out interfaces and required structs. Short of declaring the StgOpenStorageEx extern function the Interop assembly contains all the other required classes. The assembly can be installed with the Visual Studio SDK (2010 in my case) installer located on the Microsoft download page. I wish I had known that two days ago.

Posted in: .Net | Programming

Tags:

Cincinnati Day of Ruby

August 22, 2010 at 2:47 PMRampidByter

On September 11th the Cincinnati Day of Ruby event takes place. The event will be lead by Jim Weirich, Chris Nelson and Doug Alcorn. For someone like myself who wants to learn what Ruby really is, and how to use it in one single day this is the event for you! The cost is $25 for a full day event from 7:30am to 4:00pm with lunch provided.

Posted in: Programming | Ruby | User Group

Tags: