Android App writing

Post Reply
JustSumDad
Posts: 13
Joined: Thu Nov 28, 2019 2:25 am
languages_spoken: english
ODROIDs: None, looking at the N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Android App writing

Unread post by JustSumDad » Mon Dec 02, 2019 3:07 am

I have a desire to build a fuel computer app for my soon to arrive N2.
I have a lot of learning to do, I am hoping someone could aim me a little.

I will need to tie the GPIO pins of the N2 into the fuel injectors of the engine as well as the VSS and fuel tank gauge.
The app would measure the fuel used at the injector as well as the exact distance traveled via the VSS (vehicle speed sensor) and with calibration the amount of fuel in the tank.
end result I am hoping is a display like this:

Image

This has been done with Arduino, if you're interested in that check out MPGuino.

I am also looking at taking the output of the MPGuino project and tieing it into an Android app that would just act as the display unit.

The end result is a 7" single display on my motorcycle. I am trying to avoid having separate displays for each thing.

Thanx
God I wish I could write apps!

Tenaja
Posts: 10
Joined: Mon Jun 24, 2019 2:05 am
languages_spoken: english
Has thanked: 1 time
Been thanked: 2 times
Contact:

Re: Android App writing

Unread post by Tenaja » Mon Dec 02, 2019 5:12 am

I will likely follow your project, as all auto or engine projects are interesting to me. Good luck!
These users thanked the author Tenaja for the post:
JustSumDad (Mon Dec 02, 2019 12:33 pm)

Luke.go
Posts: 352
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: Android App writing

Unread post by Luke.go » Mon Dec 02, 2019 9:47 am

what is your plan to connect the VSS? GPIO via i2s, uart or just gpio?
You can use wiring pi via ndk, OR, you can also use android Things API on your apps.
I just ported some feature of android things like gpio (just as output pin, not all of input pin, input feature is not work perfectly), pwm and i2c to our android of odroid-n2.
I hope you use it to communicate with your VSS with N2. :)

JustSumDad
Posts: 13
Joined: Thu Nov 28, 2019 2:25 am
languages_spoken: english
ODROIDs: None, looking at the N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Android App writing

Unread post by JustSumDad » Mon Dec 02, 2019 12:43 pm

@ Luke.go
Thanx for the info, I just might use it when I learn how to :)

One of the Analog ADC pins should handle the fuel tank sensor 4 ohm full 182 ohm empty
The injectors connection I am uncertain about, the MPGuino compares the ON time of the injectors to the amount of distance the vehicle has traveled.
On the Arduino diagram, they simply take the switched ground injector lead and run it through a 50k resistor then run a 5.1v Zener diode to ground and take the output from that little circuit into a digital pin.
I will adapt the level shifter circuit as I am sure the N2 GPIO is not 5v tolerant.
Image
The VSS just pulses its signal and it should be as simple as counting the pulses per KM traveled.
The VSS is just a 5v signal wire, it should be easy to just plug into a GPIO pin me thinks. Using a level shift circuit of course.

My coding is VERY weak, I almost always just modify someone else's so I really expect this will be a long-drawn-out process to come up with a finished product.
God I wish I could write apps!

JustSumDad
Posts: 13
Joined: Thu Nov 28, 2019 2:25 am
languages_spoken: english
ODROIDs: None, looking at the N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Android App writing

Unread post by JustSumDad » Tue Dec 03, 2019 4:41 am

In short what I am looking for in guidance is this:

Should I be looking at Java or python or something else?

Is one better than the other for hardware interfacing with the GPIO inputs?

Googling about seems to always lead me to things designed to make games or deploy stuff on the android app store and thats stuff I do not need.

most of the app creation stuff I find is related to web based data or something from a spreadsheet so stored in a file locally, I have found nothing on how to interface with data generated from external inputs.

Thanx
God I wish I could write apps!

Luke.go
Posts: 352
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: Android App writing

Unread post by Luke.go » Tue Dec 03, 2019 11:46 am

Can you share your VSS part number?

I want to know how it communicate with board.

And, as i mentioned before, Android things is good choice to control gpio pin as just pin, pwm and i2c on the N2.

But, GPIO input feature is also not good to use. :( because some input was missed.

To use android things api, you should use java language. :)

JustSumDad
Posts: 13
Joined: Thu Nov 28, 2019 2:25 am
languages_spoken: english
ODROIDs: None, looking at the N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Android App writing

Unread post by JustSumDad » Tue Dec 03, 2019 1:30 pm

Thanx! I shall focus on Java then!

I am not sure what you mean by the VSS part number, it's just a wire that I tap into between the ECU and the speedometer.
In the case of my DL1000 (I am pretty sure this is the system) there is a 3 wire magnetic sensor on the front sprocket, this goes into the ECU, the ECU counts the pulses and outputs the VSS line to the speedometer, BUT in my case the VSS is intercepted and run through a "speedohealer" that is used to calibrate the speedometer for more accurate readout and also used to adjust for different sprocket combinations.

All in all the VSS is just a signal wire tho :)
God I wish I could write apps!

User avatar
tobetter
Posts: 4263
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 58 times
Been thanked: 234 times
Contact:

Re: Android App writing

Unread post by tobetter » Tue Dec 03, 2019 1:44 pm

JustSumDad wrote:
Tue Dec 03, 2019 1:30 pm
Thanx! I shall focus on Java then!

I am not sure what you mean by the VSS part number, it's just a wire that I tap into between the ECU and the speedometer.
In the case of my DL1000 (I am pretty sure this is the system) there is a 3 wire magnetic sensor on the front sprocket, this goes into the ECU, the ECU counts the pulses and outputs the VSS line to the speedometer, BUT in my case the VSS is intercepted and run through a "speedohealer" that is used to calibrate the speedometer for more accurate readout and also used to adjust for different sprocket combinations.

All in all the VSS is just a signal wire tho :)
I am wondering if you will install a display device to your bike for Android and what will be displayed on it.

JustSumDad
Posts: 13
Joined: Thu Nov 28, 2019 2:25 am
languages_spoken: english
ODROIDs: None, looking at the N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Android App writing

Unread post by JustSumDad » Tue Dec 03, 2019 2:51 pm

tobetter wrote:
Tue Dec 03, 2019 1:44 pm
JustSumDad wrote:
Tue Dec 03, 2019 1:30 pm
Thanx! I shall focus on Java then!

I am not sure what you mean by the VSS part number, it's just a wire that I tap into between the ECU and the speedometer.
In the case of my DL1000 (I am pretty sure this is the system) there is a 3 wire magnetic sensor on the front sprocket, this goes into the ECU, the ECU counts the pulses and outputs the VSS line to the speedometer, BUT in my case the VSS is intercepted and run through a "speedohealer" that is used to calibrate the speedometer for more accurate readout and also used to adjust for different sprocket combinations.

All in all the VSS is just a signal wire tho :)
I am wondering if you will install a display device to your bike for Android and what will be displayed on it.
7" HDMI touch screen

https://www.amazon.ca/gp/product/B07XDF ... UTF8&psc=1
God I wish I could write apps!

JustSumDad
Posts: 13
Joined: Thu Nov 28, 2019 2:25 am
languages_spoken: english
ODROIDs: None, looking at the N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Android App writing

Unread post by JustSumDad » Thu Dec 05, 2019 5:09 am

If someone wants to follow my progress or contribute or whatever here is my github page

https://github.com/JustSumDad?tab=repositories

Very blank as I write this post but hopefully it will fill up after feb 2020
working on my Ham license till then
God I wish I could write apps!

Post Reply

Return to “Android”

Who is online

Users browsing this forum: Luke.go and 0 guests