mardi 3 mars 2015

Automatically sending ALT Commands topic






Heya
I'm trying to develop my first android/arduino app.

I've read some tutorials and stuff like that, however I am stuck in a little hurdle and maybe one of you smart fellas can help me here, I believe this is the right forum.
I've searched for other similar topics but I couldnt find something close enough to answer my question.

Here's the problem:

I have a device connected to an Arduino, which is connected to a bluetooth adapter, I have been able to successfully connect it to my PC, open up PuttY and do all the sh-bang things this thing can do. Basically it outputs resistance values over and over with a line break in between, so it looks like:

10000
9999
10001
10234
10235
9323

and so forth, assuming the resistance is oscillating around 10k.

However, to begin the resistance reading I have to first send a few commands via PuttY:

ALT + 231 Initializes the resistance reader
ALT + 202 recognizes if resistors are connected
ALT + 208 return a single read off the resistance

and there's a few other ALT commands that I don't really use ,but I have the list to use them. However, I dont know how to send these commands via an Android App.
How can I tell the android app:

"Hey android app, as soon as you pair up with this device, send these ALT + xxx commands to start getting readings, and then you can display the readings on the phone screen!"

??
Any help will be greatly appreciated!

Thank you!






Aucun commentaire:

Enregistrer un commentaire