Android Studio for Wireless Robotic controller -Arduino RoboMaster Part 8

For my Arduino RoboMaster project, I have plan to control the RoboMaster wirelessly either HC-05 Bluetooth module or use WiFi network or use RF module. Whichever RF method I use, I need to build the control interface and mobile application for controlling the DIY Arduino RoboMaster wirelessly. To build the interface and mobile application I can use Android Studio since this is the officially recommended IDE and software for writing programs for mobile devices. I think later on I will also look into other IDE and software to build the RC remote car application like VisualStudio or Matlab etc.

This is my record about Android Studio and mobile application development.

For this new project, I had to start from the scratch. I downloaded Android Studio from the following link:

https://developer.android.com/studio

The installation was pretty straightforward but can take a while depending on the speed of your internet connection. The reason is that during installation android studio application will download necessary installation file from the internet.

There is another important thing we have to do during application development for mobile phones. Which is that to build mobile application with Android Studio, USB Debugging feature on your mobile phone must be enabled. There are plenty of tutorials in youtube which explains how to enable this feature.

To enable USB debugging, you have to first turn on first the Develop Options which is hidden. You can to find the section in the mobile phone setting that says "Build" in Settings > About Phone and then click on that "Build" 7 times(some say between 5 to 7). After enabling the develop option you have to enable USB debugging which is in Settings >Develop Options>Debugging>USB Debugging.

I had already enabled USB debugging in my phone when I a wrote a short tutorial Creating your first Android project:Hello Arduino. There in that learning exercise, the codes was in Java. Now after investigating a bit I came to know that now Android studio uses Kotlin for default projects. 


 I created a new project in Android Studio which is shown in the following video.


 Since Kotlin is new to me, I have been studying Kotlin, learnt basic difference between Kotlin and Java. I found out that Kotlin is a language upgrade of Java with better and smaller language syntax, removing the Null error problem in Java, targeted towards mobile application developed. Kotlin is recommended over Java. Also Kotlin can use Java classes and vice versa so there is no problem with incorporating their languages.

I still have to learn more about Kotlin and plan to create a basic app to turn on and off the LED which will be used in the DIY Arduino RoboMaster. During the last 2 days I have also worked on the Bluetooth Car upper parts and placed a crane part of a toy crane. I wanted to write about this update but don't have time because I will be busy in hospital. That is all in my today record. 

My previous records can be found in the reference below.

References

# Building RoboMaster with Arduino - Part 2

# Quick HC-05 AT startup guide - Arduino RoboMaster Part 3

# Testing RC Bluetooth Car App and Motor Code -Arduino RoboMaster Part 4

# Lithium Ion Battery and Charger - Arduino RoboMaster Part 5 

# My First Arduino RC Car - Arduino RoboMaster part 6

# RC car Battery Charger- Arduino RoboMaster part 7

Post a Comment

Previous Post Next Post