Brick in the Cloud

The Lego Machine Cloud Project

Declarative Robot Programming via Salesforce on your Mobile with Salesforce1


20131119-081643.jpgThe Lego MachineCloud project has received a massive boost in the form of two great technologies from Lego and Salesforce! I’m so pleased to confirm that my test to get the Salesforce Streaming API working on the EV3 has been a raving success! This technology allows the robot to be highly responsive to commands from Salesforce, including the hugely exciting brand new Salesforce1 mobile app.

Having uploaded the required Java libraries to the brick and adapted some Java code from a previous project. I then extended the objects I created for the previous robot to create a more “declarative” programming approach. That can be driven by Command records created by the user in the latest Salesforce user web and mobile interfaces!

Streaming Commands from the Machine Cloud

robotHere you can see a screenshot of the Robot record showing a list of commands that it has executed, note the New Command button! Simply click this button and select the type of command you want, hit Save and often before the screen can even refresh the EV3 will get the streaming API event notification and perform the command! I literally lept up from my chair the first time it did this. I’ve uploaded the source code to the project┬áto GitHub, feel free to take a look and see how its all done!

Declarative Robot Programming via your Mobile!

programI have extended the Robot and Command objects with another object called Program. This is a container for multiple Command records, allowing you to design a program in the Salesforce UI and then create a single Command record to execute that Program!


Having updated my version of the Salesforce mobile app, now known as Salesforce1, i quickly found that my Command object is now also available in this application. Within a few taps my EV3 was now also responding to commands sent via my phone! Now that is a true “No Software” reality! Amazing stuff Salesforce!


I’ll be bringing the robot you see in the video to Dreamforce with me next week, where I cannot wait to see what people think of this approach to programming the EV3 in the “Internet of Things Lab” session. Its a basic framework at this stage but the potential is huge for having Robot’s socialise (from all over the world!) on the Salesforce “Machine Cloud” platform. See you at Dreamforce next week!

Brief Demo Video

5 thoughts on “Declarative Robot Programming via Salesforce on your Mobile with Salesforce1

  1. Pingback: Dreamforce1? | Blog

  2. Pingback: Arcsona » Blog Archive » 2013 Year In Review

  3. Pingback: Video Interview with CTO Andy Fawcett | Blog

  4. Hi Andrew, seeing your successful activities with EV3 and SFDC I am wondering if you have an idea regarding this: I have set up my EV3 with leJOS. Then created a sample project in eclipse which worked just fine. Next step, I created a simple connection to SFDC using the wsc. Running locally as java also works just fine. But then uploading to the brick, I get an “unknown class” exception. … Do you have any ideas? Can you give me a hint on how you build your workspace? I suppose the lib’s might not get across. I see that you are using Ant. I am using the built in “run As” configuration.

    • Yep the EV3 IDE plugin does not currently include the project external jars in the jar it deploys, i asked this on the forum and got that confirmed, My approach has been to continue using an Ant script and invoking that from Eclipse (which is pretty much just as easy). Hopefully this week i will upload all the code from my Dreamforce 2014 session with build scripts etc. In the meantime I’ve shared as Gist my build.xml for you to take a look at. I’d like to get a community of EV3 builders and Salesforce going if your interested?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 30 other followers