PREVIOUS BLOG

NEXT BLOG

 

APP DEVELOPMENT ADVENTURES

In my very first blog, I said the main IoT component of this project would be the app which all of the STM32 modules would connect to. So this week I began development on it, as I have never done any sort of app development before, and knew it would be a learning curve for me (as is learning to use mbedOs and programming the STM32). I started with what I was more comfortable with, Web Development/Web Apps. Starting here, and knowing my eventual end point of wanting an iOS or Android application, I was able to find a frame work which allowed me to cross the gap where my knowledge was limited.

Related image

 

THE EVER WATCHING I(EYE)

 

The framework which I found is called Ionic (thus the I in this subsections title, and the eye come from its logo. Ionic uses HTML, Sass (SCSS), JavaScript (Angular2), and Cordova to turn your web applications into mobile apps with access to many of the native phone components (this is very similar to the PhoneGap framework as well). I started with the documentation and some informative blogs to get me started in the right direction and then jumped right in!

 

APP DEVELOPMENT

 

To begin I just thought of a basic design. An app with a tabular navigation at the bottom of the screen, which allows you to navigate to pages which: allow you to locate and place markers at your bike(s) location(s), lock/unlock your bike(s), and POSSIBLY if your bike is stolen you can track it's location and see exactly when it was stolen, etc.

 

Since this week was the beginning of the learning curve for me, I have been able to get a lot of headway done. However, this is not an app that will be completed in a week, especially as it will depend partially on communication with the STM32 Nucleo. I have a template with the tabular navigation model, a map which defaults to your current location, and allows you to add a marker to your current location. I have also added a button which changes its icon from unlocked to locked when pressed, which will eventually communicate with the STM32 and arm the security system, and lock the bike lock from my previous blog. You can see a some images of what I have currently below:

 

I will first be focusing on functionality of the app as I wish to complete this project, and with it being my first go at app development, I do not want to get bogged down with stylizing the app. If I have time towards the end of this project I will be going back and stylizing the app and adding a splash screen and other aesthetics.

Image result for mbed

 

OTHER CODING STORIES

 

Along with my fellow challengers I have been trying to flesh out which IDE is best to use. I, as well as others, have found that the mbed compiler looks very promising, and allows for easy IoT integration. So due to this, and the fact that I can enlist the support of the community and other challengers, I have decided to proceed with mbed's online compiler as my IDE of choice.

 

While using this I have decided to forgo the Infenion DC Motor Driver and just run the DC Motor straight from the STM32 board. There is a Servo library for the STM32 which uses a PMW pin to control the motor, so I will be using that. I have already wrote some sample code just to make sure it works (and it does!) so you can see a screen shot of the code and a video of the servo below: