Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
Arm Community blogs
Arm Community blogs
Internet of Things (IoT) blog Travels of the ARM Powered Android LEGO Rubik's Speedcuber: ESC SV 2010
  • Blogs
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
More blogs in Arm Community blogs
  • AI blog

  • Announcements

  • Architectures and Processors blog

  • Automotive blog

  • Embedded and Microcontrollers blog

  • Internet of Things (IoT) blog

  • Laptops and Desktops blog

  • Mobile, Graphics, and Gaming blog

  • Operating Systems blog

  • Servers and Cloud Computing blog

  • SoC Design and Simulation blog

  • Tools, Software and IDEs blog

Tags
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

Travels of the ARM Powered Android LEGO Rubik's Speedcuber: ESC SV 2010

David Gilday
David Gilday
September 11, 2013
3 minute read time.

As you may be aware, my ARM-Powered LEGO robotic Rubik's Cube solver "Speedcuber" was demonstrated live at Mobile World Congress '10 in Barcelona in February this year (actually it almost didn't happen because the LEGO robot fell apart while in transit and as I didn't attend, a few other ARM Engineers had to roll up their sleeves and work out how to piece it back together — thanks guys). I had anticipated that after the push to prepare the robot for the its first public outing, I could re-focus my energy on my regular day job and relax a bit more in my spare time... but things don't often go as expected in my life!

Speedcuber was a very popular demonstration at MWC so it was natural to consider demonstrating it again. However, someone (I won't name the "guilty party") suggested that we should switch to more relevant, contemporary technology; after all, the Nokia N95 phone controlling the first robot was launched almost four years ago in 2006. It was proposed that we show the robot again in April at the Embedded Systems Conference in Silicon Valley (time to forget relaxing in my spare time for another couple of months!?!).

We decided to use an Android-based phone and I set about downloading the Android SDK and acquainting myself with the unfamiliar APIs. The ARM Solution Center for Android (SCA) provided a good starting point for this. The application on the Nokia phone was written in Java using MIDP 2.0 so I hoped that the port to an Android application using Java would be relatively painless. I managed to borrow an HTC Hero for my initial work. Using one of the many example applications available via the ARM SCA I was quickly able to construct a skeleton application and user interface from a "Hello World" example and port the cube solver code.

For me, one of the coolest things about developing for Android was the ability to download and debug an application directly on the device using features such as breakpoints, code stepping and variable inspection that you would expect in an embedded software development environment. While developing for the N95, I was able to debug the application running in an emulator, an option which is also available with Android. This allowed me to debug the main solving algorithm, but didn't allow me to debug the Bluetooth and Camera interfaces. From my previous experience, I expected that writing code to interface from the phone to the Motorola DROID.

But it was all going too smoothly! Accessing the camera was more of a challenge. On the N95, I was only able to use the camera in snapshot mode rather than in streaming video mode. This limited the overall speed of the demonstration since the initial scan took several seconds to capture each of the images for the six faces of the Rubik's cube. I was hoping to be able to use the live preview image stream provided by the android.hardware.Camera class to significantly reduce the time required to capture each image in the new demonstration. It took a while to find enough information to convert the HSV images returned in the preview call-back into RGB format to allow me to use my existing colour recognition algorithm. However, once this was achieved, the Android version of Speedcuber soon sprang into life with its first solve!

The other significant change to the demonstration was to add a large LED display to show messages and solve times. Luke from the "demo team" in Cambridge worked very hard to create this from scratch using a Cortex-M3 based microcontroller, the LM3S811 from Luminary Micro using their Evaluation kit. Of course the software development environment supports debug of the embedded application while it is running on the microcontroller. Luke had to develop code to allow the LEGO NXT controller to communicate with the Cortex-M3 in the LED display using an I2C interface so I wasn't the only person to get to play with LEGO at work this time!

Overall, I had a very positive experience porting the application to Android. The developer resources are generally clear and comprehensive. Since I was interacting directly with hardware interfaces to external devices, the ability to debug the application directly on the phone was a definite win for me.

You can see the Android version of the ARM Powered LEGO Speedcuberlive on ARM's stand #1308 Embedded Systems Conference in San Jose until 29th April (assuming it survived the flight this time!)

Back to my day job... and maybe I can find some time now to relax a little?!?

Anonymous
  • vladimir
    vladimir over 8 years ago

    Where can read instruction to this speedcuber

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • David Gilday
    David Gilday over 12 years ago
    The video has temporarily been removed from ARMflix, but will hopefully have an updated video posted within the next day or so. Please stay tuned on ARMflix and @DavidGilday Twitter for any updates.
    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • Ludek Vokac
    Ludek Vokac over 12 years ago
    Hi, why is the video gone from the YouTube channel?
    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • David Gilday
    David Gilday over 12 years ago
    Thanks for your comment Johan. I'm flattered that you and a number of others have asked if I will share the robot design and software. A number of people have also said that seeing the videos has inspired them to try to build their own. For me, this is probably one of the most rewarding aspects of this project - the fact that other people have been inspired to want to make similar creations :-)

    I am busy on some other projects at the moment but I will investigate the possibility of making the design available in some form in the near future. Feel free to follow me here or @DavidGilday on Twitter so I can keep you posted if and when this happens.

    In the mean time, I hope you enjoy your studying - science is a great subject.

    Have fun!
    David
    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • Johan Wallin
    Johan Wallin over 12 years ago
    Hi David!

    I am very impressed by your work. Being a high school science student, I am interested in building one myself. Is there a possibility for me to take a look at some blueprints and maybe the app used one the phone? It would be highly appreciated with a little help on this science project but I understand if you want to keep such a marvelous machine to yourself.

    Regards
    Johan Wallin
    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
>
Internet of Things (IoT) blog
  • Transforming smart home privacy and latency with local LLM inference on Arm devices

    Fidel Makatia
    Fidel Makatia
    Learn how Raspberry Pi 5 and Arm-based local LLM inference can power a fully private, cloud-free smart home assistant with real-time performance
    • August 19, 2025
  • Building vision-enabled devices to capture the emerging wave in IoT

    Diya Soubra
    Diya Soubra
    IoT devices will drive an explosion in use cases with vision. Read more about the different use cases and what Arm technology is involved here.
    • December 9, 2024
  • The power of SystemReady for custom-built OS distributions

    Pere Garcia
    Pere Garcia
    Arm developed the SystemReady Devicetree band as part of the SystemReady program, learn more in this blog post.
    • November 22, 2024