How awesome would it be if you could control your Sphero remotely using Azure. You could be on vacation and you could control your Sphero back at home. What if then your Sphero could drive around your house like it had its own GPS, (Alright, I know it's really not GPS). What if you could tell your Sphero to go into your living room or to roll downstairs into your basement. We could even expand this to use Machine learning to help Sphero to make better decisions.
This is still a WIP and will continue to grow over time but if you have any questions feel free to email me at [email protected]Thanks,
-Matt
___________________________________________________________________
WEEK 1To get started
I have been working to make a more stable connection to interface between Azure. Currently I am making a Windows Universal app to interface with Azure, I have a 'server' running node that talks to Azure then relays commands to the Sphero.
How to update position:
Y V
^
| /
| /
| /
| /
| /
| / A
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ X
Assuming A is our angle, we can find out out Sphero's X and Y coordinates. Assuming we know the magnitude of V (magnitude being the distance traveled)
X = |V| cos(A)
Y = |V| sin(A)
We will be able to find A by using the Gyro sensor inside the Sphero, and the distance traveled by using a ratio of Time.
___________________________________________________________________
WEEK 2Where did I leave off last week? Last week, I finished up the logic for moving using simple trig functions.
What have I implemented/changed/updated/improved/etc. this week? This week, I better tuned my distance that the sphero drives to what I think it drives, (made it more accurate). I now have been working on setting up stacks on Azure for my data.
What I’m looking to accomplish next: I am having a few issues with azure that is preventing me from moving forward I am looking to fixing that to keep going.
___________________________________________________________________
WEEK 3Where did I leave off last week? Last week, I worked on setting up the Azure storage queue for sending commands to the Sphero.
What have I implemented/changed/updated/improved/etc. this week? This week, I worked on making data transfer faster as well as trying to fix some issues reading from the Sphero sensors.
What I’m looking to accomplish next: I would like to start logging all of the data back into Azure and make a map of where the Sphero went, now since the sensors are able to be read.
___________________________________________________________________
WEEK 4Where did I leave off last week? Last week, I worked on making data transfer faster as well as trying to fix some issues reading from the Sphero sensors.
What have I implemented/changed/updated/improved/etc. this week? This week, I made the app allow Cortana integration, so you can control the Sphero with your voice.
What I’m looking to accomplish next: I would like to make the voice recognition more clear, currently I have issues with Cortana thinking that the word “to” gets turned to “two” after I say “one”
___________________________________________________________________
WEEK 5Where did I leave off last week? Last week, I made the app to allow Cortana integration, so you can control the Sphero with your voice.
What have I implemented/changed/updated/improved/etc. this week? This week, I made a custom control for windows phone that renders a graph of where the Sphero has been. All data from and commands to the Sphero are stream through Azure Storage Queues.
What I’m looking to accomplish next: Finalize project, work out any bugs, make the UI a little nicer and continue to fine tune the PID control on the sphero.
___________________________________________________________________
PROJECT RECAP:
In the end my Sphero can be controlled remotely from anywhere in the world. You can even use Cortana voice commands from your phone or your Microsoft Band. From the beginning I came up with the idea to control a robot from another room and the ability for the robot to navigate it remotely. I began to think of the best way to send and receive the data, and Azure was the best solution. With lightning fast read write operations and real-time analytics Azure storage is the best way to go. So of the challenges that I faced actually had to do with the trigonometry, typically in math when a vector pointed at 0 degrees only the X value would change, whereas with the Sphero, the Y value changes when rolled at 0 degrees. So your Sphero would roll at its complementary angle, and since I implemented a simple PID theory (proportion, integral, derivative) as the ball got farther from its destination it would speed up!
Eventually I would love to use the native Windows SDK from Sphero once they have this finalized, this would cut down on lag and give the ability for people with just a Windows Phone to control the Sphero. The data could still be sent to Azure for analytics and possibly Machine Learning!








Comments