Raleigh,
North Carolina,
USA
Local Weather
Copyright © 1988-2021 by
Abbott Analytical Products. All Rights Reserved.
Page 2: Spillover From Gamepad -OTG- Android Hosting
Contents of Page
This web page contains a disclaimer/license, brief discussions concerning the road testing events,
related technical discussion of potetnial avenuves of further design improvement, a set of useful
images, and a collection of knowledge which may be found useful in the future.
Discliamer
The same restrictions, warranties, and licenses apply as annunciated earlier in the presentation of this proiject.
Road Test Videos
Most recent first.
210103 Road-Test:
Video clip showing Compass Mode Operation.
Video clip showing Gamepad Mode Operation.
Video clip showing Emergency Stop and Restart.
Road-Test Findings:
Compass Control Mode:
1> Reconfirmed proper motion control as previously demonstrated.
2> Confirmed Emergency Stop icon press working.
Gamepad Control Mode:
1> Reconfirmed the Abbottanp Gamepad successfully conveyed x/y-axis, speed, and button press
2> Confirmed Emergency Stop icon press working.<,/div>
3> Validated the pie-slice differntial steering is a good compromise solution.
3.1> The user has a suffient a leve of motion control to arrive at a location.
3.2> The hysteresis delay between input and motion is tolerable for this level of vehicle.
3.3> The current gamepad solution is a great improvement in user friendliness.
4> Confirmed A-button command execution.
5> Observed that the road test 1GB long consumed about 9% of the Android device's battery.
5.1> Provding power for Orion based gamepad.
5.2> Providing support for WiFi communication.
6> The Android application, a038_949_gamepad_otg_wifi.apk, is a mature code module.
6.1> Acquires the Orion's Serial joystick, speed and button inputs.
6.2> Converts the input string into valid message bundles.
6.3> Delivers the message bundles reliably to the WIFI access point.
System-wise:
1> Reconfirmed: Need to have rounded or elliptical platform shape to enhance robustness.
2> User friendliness was improved by retrofiting the power supply.
2.1> The two 9volt batteries were rubberbanded together forming a battery pack.
2.2> The battery pack was secured to the platform using a folder-size rubberband.
2.3> The folder size rubberband supported "tucking" other wires to improve the profile.
2.4> During the making of the 1GB road test video, the batteries demonstrated a power drop of less than 10%.
3> To propagate the solution to another user/environment is no simple
3.1> An Arduion project compile of user specific jelly.h WIFI security pair and its upload are rerequired.
3.2> Having any major difference between gamepad, Android, WIFI Access Point, and vehicle components will
cause unique hysteresis that will require delay modifications, recompile, and upload.
Going Forward:
1> Close project as a limited success.
1.1> The prototype gamepad needs additional capability/flexibility. See Helpful Images.
1.2> Within the limits of the projects, the vehicle is as "good" as it can be. See Helpful Images.
2> Upload project artifacts to GITHUB as time permits.
3> Consider adding ehancements:
3.1 Using a configuration file
3.1.1> To set user specific WIFI security pair.
3.1.2> To establish user prefered delay times.
201005 Road-Test:
Video1 of road test with crash conducted 201005.
Video2 of road test conducted 201005.
Road-Test Findings:
Compass Control Mode:
1> Reinforced observations for the 200927 roadtest reported below.
Gamepad Control Mode:
1> As reported 200927 the Abbottanp Gamepad successfully conveyed x/y-axis, speed, and button press
over the otg to the Samsung Tab2 Android.
2> As reported 200927 the Android successfully parsed the incoming messages, reflected them
on the tablet's screen, and passed them to the WIFI.
3> The replacement of the tank steering algorithm with the "differential pieslices" proved effective.
3.1> The pieslices and switch-case provided quick responses to user motion changes.
3.2> It is more difficult to "drive" the vehicle with the Gamepad compared to the Compass mode.
3.3> Making speed adjustments like driving a car help the user to adjust motion.
3.4> Vehicle drift due to motor difference begin to impact the sterring controlability.
4> Software changes to accommodate error and default messages (x/y, speed, and kill button) proved effective.
5> Software changes to address the opening of the OTG stream and its "settling" were shown to be effective..
6> Software changes to convey speed changes made on the Gamepad were found were found to effectively
be reflected by the differential pie slices processing by the AMS2.ino motor speed/direction controller.
System-wise:
1> Reconfirmed: Need to have rounded or elliptical platform shape to enhance robustness.
2> Reconfirmed: Regardless of mode the Chaser consumes on-board batteries at a high rate.
3> Reconfirmed: The squirrelChaser program flow (beyond the Compass/Gamepad modes aspects)
provides solid usability and user friendliness.
4> Reconfirmed: The current design is not elegant or robust.
5> The squirrelChaser is "very" under powered and subject to drift .
6> Reconfirmed: Relying on WIFI is not a great solution, but it is available within the expected region of deployment.
Going Forward:
1> Publish project "as is of this date: 201005".
2> Look into "dampening" the turning so that stable forward/backward motion returns after turning.
3> Improve the battery pack and its connections.
4> Take a second look at chassis robutness, remote control, battery consumption, etc. as funds become available.
5> Take a second look at appliance to add such as strobe light, camera, etc.
200927 Road-Test:
Video of best test run from road-test.
Road-Test Findings:
Compass Control Mode:
1> Remains solid until on-board battery power weakens and begins to drop WIFI packages/connection.
2> This control mode response quickly to the users instructions.
3> Transfer to/from the Gamepad Mode playingfield is seamless from/to the Compass Mode playing field.
Gamepad Control Mode:
1> The DIY Gamepad successful conveyed x/y-axis, speed, and button press over the otg to the Samsung Tab2 Android.
2> The Android successfully parsed the incoming messages, reflected them on the tablet's screen, and passed them to the WIFI.
3> The current tank steering algorithm is slow and unresponsive compared to the Compass Control Mode.
4> The error and default messages (x/y, speed, and kill button) were found to be in need of work.
5> Add a brief "delay" between the opening of the OTG stream and its "settling".
6> Speed changes were shown on the Tab2 but not reflected in the AMS2.ino handling.
System-wise:
1> Need to have rounded or elliptical platform shape to enhance robustness.
2> Regardless of mode the Chaser consumes on-board batteries at a high rate.
3> The squirrelChaser program flow (beyond the Compass/Gamepad modes aspects) provides solid usability and user friendliness.
4> The current design is not elegant or robust.
5> The squirrelChaser is "very" under powered.
6> Relying on WIFI is not a great solution, but it is available within the expected region of deployment.
7> The AAP Gamepad (box) survived a fall of 35 inches to a concrete floor.
Going Forward:
1> Return to the spreadsheet that was used to collect static
tank steering control information.
1.1> Focus on the section which explored the "possible"
segmentation of X/Y axis to angle
to determine whether a pie segment analog to digital
translation is feasible.
1.2> Replace the current if then else if to a more
streamlines switch-case executive loop approach.
1.3> Employ the possible usage data from
the spreadsheet in creating "safe - meaningful" error and default messages.
2> Investigate the usefulness of altering the common uniform delay assoicated each motion instruction.
Hold That Thought
Below are "agressive" chassis desgin considerations for another time:
Below are useful repositories for libraries:
Squirrel Chaser Vendors and Variations:
Raspberry - bluetooth chase vehicle. Appears to be well supported.
Suspect WiFi controlled vehicle. Explore totally at Your Risk but with "LOTS" of sales' promise.
Robot Car Assembly
...led to: tinker toy style assembly version.
...and to fullmetal jacket dolid looking design.
****Excellent Knowledge Transfer: IR Control critter chaser version.
........Same Presenter 433 MHz RF Modules for wireless commo between Arduinos
........Same Presenter Wireless Joystick for Arduino Robot Car
Great Best Practices for creatinging "small remote controlled vehicles"
Useful Images:
Gamepad
| Steering
| Playingfield
| Enhancements??
|
Gamepad-OTG-Android

Top of Lid

Speed & Button

RJ25 Adapter
Correction:
Btn Jumper to GND and S2

Joystick

Cable Ties

Bottom of Lid

|
Images Showing Evolution









Implemented As Shown
Six Segments

Mapped to Switch-Case

|
Android Studio IDE
hariharan example
felhr.usbserial library

Extension Shootout
A2I Ok Corral

MIT A2I IDE
ewpatton AIX model
usbserial.jar library

a038_973_gamepad_otg
_wifi
g038_otg_usb.aix
Compass Mode

Gamepad Mode
No Button Pressed

A Button Pressed

Typical Serial Monitor Images




GTKterm & Log

E-Stop Press and Reset
|
Additional Buttons
Two per RJ25 Adapter


Four per Me4Buttons

I2C Bus
3x4 or 4x4
Button Array

Radio/Light
Controllers

Mario Project

Robust Chassis



Ready Made Options


Jump to Biped

|
Knowledge Touched/Acquired that May Be USeful in the Future
- A helpful gamepad example.
- Masking bits discussion at wikipedia
- Comment regarding the LWJGL.org example
- GLFW_BUTTON/JS/TRIGGER
- Constant Values
- Gamepad inputs search on "gamepad mapping with glfwJoystickIsGamepad"
- Gamepad Buttons
-
No longer needed for project. Hold for future. Beeware How-to web page https://docs.beeware.org/en/latest/tutorial/tutorial-0.html. Working with Beeware to generate a "cut" of the "F310_Gamepad_Parser-master.zip" python parser program. The thought is to provide an Android "user space" driver suitable for the F310.
Command
|
Comment
|
To run a beweware
pyhton development
session
briefcase new
briefcase dev
briefcase create
briefcase build
briefcase run
briefcase package
" create android
|
cd /media/tom/Silo_002/TechWork/x_beeware
python3 -m venv beeware-venv
source beeware-venv/bin/activate
Configure a new project
Launches project for testing
Assembles project dependencies/libs
Generates AppImage
Executes project
Does nothing
Prepares program for Android APK
|
-
No longer needed for project. Hold for future. Article: Linux: Write a Simple Driver for USB:
Briefly describes how to capture information regarding the known working Windows drivers for the F310. Drivers and
sniffer tools have been acquired and await installation of Windows brick.
https://www.linuxjournal.com/article/7353
-
Logitech F310 query Ticket 3887816 No longer needed for project.
Question to Technical Support: I need to interface the F310 to a Samsung Tab2 via the USB/OTG. I have the Logitech VID and F310 PID. I need to know type of serial converter chip the devices uses so I can create the driver or assign the F310 to one of the chip drivers that is already available.
200817: Thoughts Regarding 200817 Logitech response that information was unavailable to public.
Three possible different work-arounds evolved for this impasse.
1> De-engineer the logitech F310 driver lgs510_64.exe using a sniffer tool and then use that information. But then we are stuck with the Android root versus users space issues.
1.1> Retrofit the phsyicaloid library driver that is currently operational for supporting Android-otg-serial user space communication.
1.2> Retrofit other available usb communication library
2> Replace the F310 gamepad with one of our own in-house designs. We now have a working prototype of this gamepad talking to the Android using opensource resources. The current prototype has two joysticks and four buttons. One branch of this design will grow the number of buttons to around seventeen. The prototype does not have the ergo-dynamic esthetics of the F310. But it will readily suit our needs.
-
Keymapping of the F310 Gamepad
No longer needed for project.
|
Pick button from Gamepad image below for details.
|
Mapped Button:
|
WIP:
|
|
Potentially helpful information regarding the F310 and associated
gamepad/joystick drivers. As implemented the squirrel-chaser solution
relies upon the Android USBSerial driver library.