As hinted at in some of the previous posts I'm going to be using the board to complete a small project. Because the SDK only supported UART and GPIO at the time I started the project I was looking for something that could be run with that. My first thought was some sort of guage using a stepper motor. Then a chance discussion with my boss about the flakey GPS collar he has on his dog got me thinking if there were GPS modules that use serial comms. I found a suitable module whcih was designed for drones. I was thinking about something a bit like the South Facing Chariot. However given that I was also thinking you could program where you wanted to go, perhaps this is a bit more like Jack Sparrow's compass, so I suspect my results will end up more like that.
So the key coding challenges will be:
- Decoding the serial comms from the u-blox reciever
- Driving the stepper motor
- Getting the destination
- Calculating the direction
Decoding the comms
There's a 400 page data sheet to read on the GPS reciever. I've soldered some headers onto the device and hopefully will be able to do some experiments using the Azure Sphere as a terminal. I also found a couple of examples of Arduino libraries for these devices although I'll need to port any C++ constructs back to C as the Azure Sphere does not support C++ at this time.
Driving the steper motor
I did some work on stepper motors for the Topsy Turvy Clock so I'm pretty happy with how I'm going to attack this. For homing the motors I think I'll just get the user to do this manually using the buttons (or some external buttons) on the board. Although it may end up being easier to go for the slotted disk approach again.
Getting the destination
Although the Azure Sphere does not need to use the Azure IOT hub to work, I'll like take advantage of the "Device Twin" functionality to pass the co-ordinates from a web UI back to the device.
Calculating the direction
I did some searching and found a suitable algorithm for this, I've ported that the C# and will be using an Azure function to get the data. There should be a post on that later in the week.
As always I'll be putting the code onto GitHub.