Thanks tack! that's exactly what I need.
It requires v1.6 and above
which is Donut according to Wikipedia Android Version history
so it should be able to work with some really old devices
Yes you need to configure the controls each time you run BTInterface so you'd probably write small functions/subroutines to do that and then you can further configure the controls on the fly.
When you first connect BTInterface sends the string
your sketch would be looking out for that to know that its connected so you might write (pseudo code)
if command = btinterface then call screenconfig1
if command = b1 then someone pressed button1 so call b1Sub
if command = sb with a number between 0 and 100 (slidebutton) then someone has altered the value of the slidebar
(I believe I uploaded a sketch on my forum at btinterface.com that shows how to read and deal with this)
screen1 // change to screen1 (the one with the controls)
hide some buttons
pad hide //hide the gamepad buttons
change some button text
write some text in a label
set the slidebar to position 50
say Ok the screen is configured now. //use the text to speech engine to speak the words 'Ok the screen is configured now.'
sms 0123456789 This is a text from your doohickey just to let you know that screen1 is configured and ready
sfx10 //play a Bell sound effect
var screenstate = 1
if screenstate = 1 then turn on the motor
change b1 text to 'Motor Off'
etc .etc. etc. etc .
It's tremendous fun
See my link about how to get it to work with a PC / Laptop just for trying it out