Been experimenting with the App Inventor 2 for some time now, building personal projects.
I'm attempting to create an app that will interact with a piece of hardware-- a set of digital calipers specifically.
I want to utilize the headphone jack as a way to get data from the calipers to the phone, but I can't find a built-in feature or any extensions that achieve this. The data output is very simple, just a clock pin and a data pin, ordinary binary signals, I just need a way to read them.
I know I can use bluetooth, but I wanted to avoid building a separate piece of hardware to accept the data from the calipers and then send over bluetooth. I don't have experience writing my own extensions, which could have been an option but I'm not skilled enough in Java to accomplish this.
Is there any way this can be done?
--
What kind of digital calipers have an output port?
--
A brief search of Amazon found only LCD displays on them.
They're quite common actually, many don't indicate that beneath a small lid on the upper section of the plastic there is a 4 pin data output port. For example (see last product picture) :
iGaging ABSOLUTE ORIGIN 0-6" Digital Electronic Caliper - IP54 Protection / Extreme Accuracy https://www.amazon.com/dp/B00INL0BTS/ref=cm_sw_r_other_apa_.8ZTyb817BP9D
Only need two or three of these pins to obtain data through a headphone jack
I have one working ideas so far- one is to use the MIT sound analyzer extensions source code, adjust its pitch analyzing function to count highs and lows (digital signal), using the clock pin as a trigger for measurement.
But, there must be a protocol already written to read the data from the headphone jack anyways.
--
iGaging ABSOLUTE ORIGIN 0-6" Digital Electronic Caliper - IP54 Protection / Extreme Accuracy https://www.amazon.com/dp/B00INL0BTS/ref=cm_sw_r_other_apa_.8ZTyb817BP9D
Only need two or three of these pins to obtain data through a headphone jack
I have one working ideas so far- one is to use the MIT sound analyzer extensions source code, adjust its pitch analyzing function to count highs and lows (digital signal), using the clock pin as a trigger for measurement.
But, there must be a protocol already written to read the data from the headphone jack anyways.
--
I see the Amazon PC data cable for that device costs twice the device itself!
--
I would consider trying a Raspberry Pi Zero W for $10, if you can find one.
I hear they sold out immediately on Adafruit.
Or just use the Raspberry Pi Zero for $5, and connect to AI2 by Bluetooth.
Advice but not an AI2 solution: https://www.google.com/search?q=headphone+jack+java&oq=headphone+jack+java&aqs=chrome..69i57.5087j0j4&sourceid=chrome&ie=UTF-8
--
Do you have access to technical data on the signalling technique used on the output port?
Is it ASCii serial coding on RS-232 voltages?
An oscilloscope might be necessary to figure out the data stream.
--
댓글 없음:
댓글 쓰기