Connecting with Bluetooth devices

tsteward

Well-Known Member
Licensed User
Longtime User
Interested in what to look and advise or how to for in a Bluetooth device so as to write an app to work with it.

More specifically I want to purchase a pair of Bluetooth vernier calipers like linked below, and interact with the measurements it takes.

So My app would take the measurement and given a certain scale it would display a number on the phone between 10 and 9 typically.

CALIPER
 

drgottjr

Expert
Licensed User
Longtime User
the good news is you don't need anything special for these devices; they connect to your smartphone like a bluetooth keyboard (HID).
you'll pair with the device like you would with an external keyboard (turn your bluetooth on, turn the device on and pair). on the android
side you just need an edittext view with the focus set. you do whatever you do with a caliper and press a button to send the readings
to you android. my guess would be it's some kind of delimited string. you can probably display it as is (in the textview) or parse it into something
more graphical.

the bad news is i don't follow what you mean by:
pair of Bluetooth vernier calipers like linked below, and interact with the measurements it takes.

why do you need a pair? i don't think you can interact with 2 HID keyboards at the same time...
 

drgottjr

Expert
Licensed User
Longtime User

tsteward

Well-Known Member
Licensed User
Longtime User
ah. my English she is weak.
My apologies for the confusion, Yes, it's the way I used English where a pair does not always = 2
Thank you for your input. When they arrive, I'll let you know how it goes but you believe they will probably send a string to anything that has focus at the time of pressing the send button.
 

drgottjr

Expert
Licensed User
Longtime User
that's the way this type of "keyboard" works, eg, a bluetooth barcode scanner: the output of the scan is automatically sent as a string to an in focus edittext view. in this case, you apparently have to press a "send" button of some sort. at least, that's what the manufacturer says on its website. you should probably make sure the pairing is set first and that the device has found your smartphone (you'll see a tiny icon at the top of the screen). if you forget to have things set up first and, instead, turn on the device after the app has started, the device will be recognized of course, but the app will jump to resume. this isn't necessarily a problem unless you make certain assumptions about the state of your app should this happen. (for example, your edittext will probably lose focus, and when you press the button, nothing will appear to happen.)
 

Cableguy

Expert
Licensed User
Longtime User
125$ for a caliper?????
If all you want is the ability to read out the mesurements and send them by wireless, there are plenty of videos on how to "hack" a caliper's serial!

 

Cableguy

Expert
Licensed User
Longtime User
You will spend more..
seriously?
ESP32 C3 ~ 10$
Calipers ~ 20$
Miscelaneous ~ 5$
B4R is Free!
SO, in my book, it's 125$ for ready made vs less than 40$ for a DIY with the bonus of the lessons it provides! It's at least 65% cheaper!

[EDIT} even if you throw in a cheap LCD to do the readout, redundantly, it only adds 5$ more!
 

f0raster0

Well-Known Member
Licensed User
Longtime User
seriously?
ESP32 C3 ~ 10$
Calipers ~ 20$
Miscelaneous ~ 5$
B4R is Free!
SO, in my book, it's 125$ for ready made vs less than 40$ for a DIY with the bonus of the lessons it provides! It's at least 65% cheaper!

[EDIT} even if you throw in a cheap LCD to do the readout, redundantly, it only adds 5$ more!
Add the time spent dealing with that - anyway, it's a bit off-topic from the original question ;)
 

Cableguy

Expert
Licensed User
Longtime User
Add the time spent dealing with that - anyway, it's a bit off-topic from the original question ;)
Yes, I know... but sometimes we concentrate on the wrong questions!
 
Top