|
Re: [FTC]: New Android Control System
Now it's time to actually do some work on program files. Up to now, I've only followed other's procedures and relied on the automatic features of Android Studio. I need to understand what I’m looking at in this Android Studio window. There must be over 100 buttons and thingies… - I started looking at the ton of directories and files generated by Android Studio (let’s shorten to AS). I’m wondering: “where’s the program code in all this mess”. I started reading here: "Your Android project is now a basic "Hello World" app that contains some default files. Take a moment to review the most important of these...".
I’ve found Buckey Roberts’s tutorials really good at introducing me to the complexity of AS: "Android App Development for Beginners - 5 - Tour of the Interface" and "Android App Development for Beginners - 6 - Android Studio Tips"
- When I had gotten to this point, I understood that the program code was here: C:\...\AndroidStudioProjects\HeloWorld\app\src\mai n\java\org\simhardware\heloworld\MainActivity.java. Then I did some study of Java for beginners. I got stalled with “object oriented”, “classes”, “methods”, “activities”, and a bunch of other concepts I couldn’t hold in my head long enough to see how this related to controlling a robot.
I then went looking for “simple” source code for a program (app) to talk to the game controller (Logitech F310). I was looking for something that would connect and read input actions; analog values of joystick and digital button presses. I wanted it to simply write the data to a text screen on the ZTE. I didn’t find exactly what I was looking for, but did find this: "Supporting Game Controllers" and downloaded: " ControllerSample.zip " This is a simple game that looks like "Asteroids" that I played years ago at the video arcade. :-)
- I'm now playing with stripping out the game stuff and writing the F310 inputs to a text screen on the phone. Progress to follow...

Last edited by DavisDad : 25-05-2015 at 09:35.
|