Where to advertise my android bluetooth interface software?

Put a new video on the site today :slight_smile:

www.BTInterface.com

As the Arduino becomes 'self aware' it starts to get a little scary!

I was just playing with bluetooth right now (though on my teensy 3.0 and not an official Arduino). I have a HC-05 that I bought off of ebay, and I hook it up to one Teensy's 3.0 serial ports. Using the Connection Terminal app, I am able to connect to the device, and send/receive text. With your app, it never pairs with the HC-05, and it only sees my my wife/daughter's phones and not the HC-05.

At present, I haven't changed the name or passcode used for pairing (1234). Here is a link to the item from the seller: http://www.ebay.com/itm/HC-05-Bluetooth-Transceiver-Host-Slave-Master-Module-Wireless-Serial-6pin-/221158958927?pt=LH_DefaultDomain_0&hash=item337e19e74f.

Hi Michael,

Your BT Module is better than mine :slight_smile:

Specifically because you can change its mode between Master and Slave. I may have to get me one of those :slight_smile:

The module must be set to Slave mode, I suspect that your other phones can't see it either but otherwise when it is set correctly it should display a fairly rapidly blinking LED (which is blinking evenly) and then it is 'discoverable' so you can go into bluetooth settings and 'scan for devices' to find it.

Firstly congratulations on purchasing both bits! You purchased the bluetooth module plus the backplane where it is really easy to accidentally purchase just the bluetooth module without the backplane or just the backplane without the bluetooth module everyone should read the posts on my forum at BTInterface.com before purchasing one!

By default when its found your module should show up as 'HC-05' (mine is 'Linvor').

Otherwise its the same as mine, you don't need to connect those extra two pins up, Key or State, you just need the power pins and the TX/RX.

Note that even without the TX & RX pins connected to anything and only with the power pins connected if the module is in the correct mode (Slave mode) then the LED will flash and you can scan for it and find it and pair with it from any bluetooth phone (mine flashes at a constant 4 hertz (ish)).

So I suspect that your only problem is that it is in Master mode and as such IT is the one who would do the discovering and not the other phones.

You can change its mode by issuing AT commands to it (modems anyone :slight_smile: )

You can issue AT commands only while it is not paired and connected.

Use your terminal app to just send the two letters AT ... try with lower case, then upper case, when it is working sending the command AT will get it to send back 'Ok'
You may have to try different settings in your terminal app. For the Arduino its called the 'Serial Monitor' and it may or may not require a 'line ending', I leave mine set to 9600 baud which is the default that the Bluetooth module comes set at and the default that BTinterface works at.

In mine it must be an uppercase AT to get it to return OK

Then you can issue AT commands to it, and one of the commands that you need to issue to yours is the one to put it into Slave mode.

By the way you can also do other cool things with AT commands such as:

AT+VERSION returns the software version' This is a harmless command to send, use this to make sure you are sending AT commands correctly.

Note it must be exactly as above, AT in uppercase then the plus sign and then the word VERSION also in uppercase, then mine returns: OKlinvorV1.5

AT + NAMEname Returns OKname max 20 chars so for example issuing the command AT+NAMEBTInterface.com changes the module's name to BTInterface.com :slight_smile: so when it is in Slave/Discover mode that's what you'll see when you scan for devices :slight_smile: Remember that when you make your cool doohickeys.

AT+PINxxxx Returns OK setpin You can change the password!!! usually set at 1234 you can use this to change it to something else... be careful!!!

AT+BAUD1 Returns OK1200 'now set to 1200 baud

AT+BAUD2 Returns OK2400 'now set to 2400 baud

table: (you want number 4)

AT+BAUD4 to set it to 9600 baud which is the rate that BTInterface is designed for.

1 1200
2 2400
3 4800
4 9600
5 19200
6 38400
7 57600
8 115200
9 230400
A 460800
B 921600
C 1382400

I would leave it set to the default 9600 baud, note that if you change the baud all of a sudden you may start receiving rubbish characters in your serial monitor, that's cause you have to now change the serial monitor's baud rate to match :slight_smile:

And now.... tadaaaaa...... you will need to issue the command:

AT+ROLE=0

To set it to slave mode.

Lastly, I lied about those AT commands above, it would seem that they are different for the HC-05 as attested to in this really REALLY horrible manual that I found...

I saved it on my website here:

http://www.btinterface.com/btinterface/HC-Serial-Bluetooth-Products-201104.pdf

Note that when they write 'salve' they mean 'slave' ...

Even more lastly I didn't lie about the AT+ROLE=0 command, that one is from this HC manual so try this first.

The correct AT commands for the HC-05 are in the horrid manual.

Hey everyone please join my forum on BTInterface.com and I'll be glad to help with all aspects of Bluetooth doohickeying :slight_smile:

ian

Yes, look at this masterfully crafted wording from the horrid manual about the HC-05:

Typical method: On some specific conditions,
master device and slave device can make pair with
each other automatically. (This is the default
method.)

So a translation means that the HC-05 by default is set to Master and it can pair automatically with another module set to slave.

This is pretty cool, it means that theoretically you could take both ends of an RS232 cable, replace them with these modules, one in Slave mode and one in Master mode (you would need some TTL to RS232 voltage level converters) and without any other work you have changed the wired connection to a wireless connection.

Earlier societies would have viewed stuff like this as black magic and accused you of witchcraft! (back in the 1980s).

Ooh! Look! a much better document, the datasheed for the HC-05 !

http://www.BTInterface.com/BTInterface/HC-05-datasheet.pdf

IanMcRV:
Hi Michael,

Your BT Module is better than mine :slight_smile:

Specifically because you can change its mode between Master and Slave. I may have to get me one of those :slight_smile:

Yep, it took some searching to find one that is switchable, and available from a US reseller. Though for an Arduino, I may go with a BT shield, rather than mess around with voltage converters (the HC-05 is 3.3 volt, which is why I was trying it out on the teensy 3.0 first).

IanMcRV:
The module must be set to Slave mode, I suspect that your other phones can't see it either but otherwise when it is set correctly it should display a fairly rapidly blinking LED (which is blinking evenly) and then it is 'discoverable' so you can go into bluetooth settings and 'scan for devices' to find it.

Maybe I wasn't clear. With my phone, using its normal bluetooth menu, I can find and pair with the HC-05 without doing anything to the HC-05. Similarly, with another app (Connection Terminal by HPS Technologies), I was able to connect to the HC-05 and send characters to the device, and read what it sent. Using the same setup with your trial app installed, it is not able to find the device. So there is something that you are doing that can't find the HC-05, that Connection Terminal and my Samsung Galaxy S II phone can do.

IanMcRV:
Firstly congratulations on purchasing both bits! You purchased the bluetooth module plus the backplane where it is really easy to accidentally purchase just the bluetooth module without the backplane or just the backplane without the bluetooth module everyone should read the posts on my forum at BTInterface.com before purchasing one!

Yep, I almost purchased one of those backplanes, until it kicked in that price was too low compared to the competition.

IanMcRV:
By default when its found your module should show up as 'HC-05' (mine is 'Linvor').

Yes. I do plan on changing the name and pass key, eventually, but it did come up as HC-05. As somebody who has connected modems to computers way back to 300 baud modems, and I had setup UUCP connections and created dialer scripts, I was familiar with the Hayes AT instruction set, and I had downloaded the AT commands, but I hadn't gotten around to putting them in the setup function.

IanMcRV:
Otherwise its the same as mine, you don't need to connect those extra two pins up, Key or State, you just need the power pins and the TX/RX.

Yes, I had all 4 pins connected.

IanMcRV:
Note that even without the TX & RX pins connected to anything and only with the power pins connected if the module is in the correct mode (Slave mode) then the LED will flash and you can scan for it and find it and pair with it from any bluetooth phone (mine flashes at a constant 4 hertz (ish)).

So I suspect that your only problem is that it is in Master mode and as such IT is the one who would do the discovering and not the other phones.

No, the problem is your app doesn't connect when other devices can. It may be because I had the device already listed as being paired with the phone may have interfered with the connection. I did try it with the device already paired and not paired, but I didn't tell the phone to forget the connection.

IanMcRV:
I would leave it set to the default 9600 baud, note that if you change the baud all of a sudden you may start receiving rubbish characters in your serial monitor, that's cause you have to now change the serial monitor's baud rate to match

IIRC, as a trivia point, the AT letters were chosen by Hayes, because the encoding of 'A' and 'T' (0x41 0x54) allowed the modem to better guess what the baud rate and parity were.

Well being a fellow modem guy you obviously know about AT commands, I built a 300baud modem for my commodore 64 once :slight_smile:

If the device is set to slave mode then the only thing I can think of why it might not work with BTInterface is the baudrate.
Should be 9600 for BTInterface which is usually the default for these modules.

I suspect that the hardware of these modules is the same and this guy called Byron made a reflasher:

To flash the software where I believe I could flash the HC-05 software on to my module which I think is the HC-06 (slave only).
If it is the same hardware then I can assure you that it works fine on the 5v Arduino, should work between 3.3 and 6v.

All BTInterface does is start the Android pairing process which you can do manually if you prefer.
Once the device is paired it should be just a normal serial bluetooth device although I have noticed that it always says 'paired but not connected' even while it is sending and receiving to it :slight_smile:

You say

the problem is your app doesn't connect when other devices can.

Do you mean 'where other software can' ? Can you connect other apps but not mine?
There's another app called ArduinoCommander, can you get that one to work with your module? on the same Android device?
Its just that I'm not sure if its something to do with the Android device or if its specific to BTInterface?

In any case I thank you for trying BTInterface :slight_smile:

ian

IanMcRV:
Well being a fellow modem guy you obviously know about AT commands, I built a 300baud modem for my commodore 64 once :slight_smile:

If the device is set to slave mode then the only thing I can think of why it might not work with BTInterface is the baudrate.
Should be 9600 for BTInterface which is usually the default for these modules.

I suspect that the hardware of these modules is the same and this guy called Byron made a reflasher:
Byron's Blog: HC05 Firmware
To flash the software where I believe I could flash the HC-05 software on to my module which I think is the HC-06 (slave only).
If it is the same hardware then I can assure you that it works fine on the 5v Arduino, should work between 3.3 and 6v.

All BTInterface does is start the Android pairing process which you can do manually if you prefer.
Once the device is paired it should be just a normal serial bluetooth device although I have noticed that it always says 'paired but not connected' even while it is sending and receiving to it :slight_smile:

You say

the problem is your app doesn't connect when other devices can.

Do you mean 'where other software can' ? Can you connect other apps but not mine?
There's another app called ArduinoCommander, can you get that one to work with your module? on the same Android device?
Its just that I'm not sure if its something to do with the Android device or if its specific to BTInterface?

The app 'Connection Terminal by HPS Technologies' connects fine to the HC-05. As I thought earlier, the fact that I had previously paired the device with the phone might be interfering with BTInterface. When I told the phone to completely forget about HC-05, then BTInterface could pair to it, and I was able to connect. There after, it remembers the HC-05.

I just did a search, and I could not find an Arduino Commander app. There is an Arduino Uno Commander app, but that only works on the USB cable (and it does not work with teensy 3.0).

Note, Connection Terminal can turn on/off the bluetooth device in my phone (Galaxy S II for t-moble), while with BTInterface, you have manually turn on bluetooth before entering the program, or you get a Java error message: Unable to start discovery.

I really, really, really hate that BTInterface makes a sound when connecting and disconnecting. There appears to be no way to shut up the program.

ArduinoCommander

jack_fr has made it, looks good!

http://arduino.cc/forum/index.php/topic,91261.0.html

Yay! you got it working! welldone.

As I thought, your module can:

•User can connect 3.3 to 5VDC and connect TX and RX to your control IO (general 3.3 to 5V digital input output of MCU or arduino IO is ok, or general TLL IO)

They're pretty indestructable :slight_smile: You can connect them to 3.3volt or 5volt logic with no problems.

ah:

I really, really, really hate that BTInterface makes a sound when connecting and disconnecting. There appears to be no way to shut up the program.

This is exactly what I need, someone to constructively criticise so that I can figure out what people want and what they need to fine tune BTInterface to be the best that it can be.

Invaluable!

I shall put another panel of options in the settings (Menu button/Settings) where I'll make both the 'connected' annoying sound and the 'disconnected' annoying sound optional :smiley:

Actually I think I'll make them numbers so that you can choose your own annoying sound effects :smiley: (or leave them blank for none).

Thanks Michael, please keep the ideas coming!

What I really want is to have a set of 'buttons' displayed on the phone, and each button has a text sequence that when pressed, that text is sent. For example, in my test setup, I have 4 LEDs, and if I get 'a'..'d', it turns off the LED, if I get 'A'..'D', it turns on the LED, '*' turns all on, '0' turns all off, and '.'/',' sleep for a given period of time. In fact, I would prefer if there were two texts associated with the button, one for when the button is pressed, and another when it is release after being pressed. In button mode, perhaps have some amount of screen to show the output text. Basically, I want to have remote push buttons, using the phone instead of an infrared controller. I want to swipe to turn on the phone, push a button, and then turn off the phone.

It would be nice to be able to have different text on the display of the buttons than something like '0', '1', etc.

Like the other app, the text output area is flawed in that it doesn't scroll to the bottom when you get new output (and there isn't a scroll bar or other indication you got new output). It is useless (IMHO) if I have to continually scroll down to see new output. At least have an option to automatically scroll down or not like the Arduino Uno Commander does for USB output.

Extra points if you can interpret ANSI text controls to display output in bold, italic, underlined, blinking, and in the 16 colors.

Also, IMHO, on both apps, I find it undesirable to have to enable the keyboard to enter text, and then you have to hit the back arrow key to be able to actually send text. This may be an Android thing, but it is annoying. Yeah, I should have gotten a phone with a real keyboard, but I didn't like the features on the phones with keyboards compared to the Galaxy.

I'm not sure I would ever use the SMS feature, and I do not want the app 'phoning home'.

With BTInterface your main loop would be listening out for the string 'btinterface' this is to detect when it is connected.
Then when it heard it you would have a routine to change to screen1 where you could configure the controls.
You would hide all the controls that you don't need and change the labels on the buttons etc. and if necessary write some text in the labels that align with the main 4 buttons.

This configuring of screen1 might initially be in a function and then you might have several functions to configure screen1 in different ways.

Pressing any of the buttons will always send that buttons value and this can't be changed so pressing the b1 button will send the string 'b1' over the serial connection.
You would be responsible for knowing where you are in your code and what that b1 means at that point.

Here is a simple bit of pseudo code to illustrate where the character ' designates comments:

void loop(){
if(command == "btinterface"){
  config1() 'if I see the string btinterface then I know that we have a connection, either for the first time or after a disconnect so I'll call the function config1() to configure screen1:
 intMode = 1 'set variable so that I know I'm in 'config1' mode
} 'end of if statement

if(command == "b1") { 'then I know that b1 has been pressed
if(intMode == 1) { 'then I know that b1 has been pressed while I'm in Mode1 so I'll do a mode1 button1 press thing
send("say Ooh. I see you are in mode one and that the button which currently reads as. Action One!. has been pressed.")
send("sms 0123456789 this is a text message from your microcontroller just to let you know that I am currently in Mode 1 and the button Action One! has been pressed.")
'do other Mode1 Action One! things here.
'perhaps Action One! needs the screen1 to be reconfigured into mode 2? if so then:
config2()
intMode == 2
}

} 'end of loop

void config1(){
send("screen1") 'this causes BTInterface to change to screen1, also if BTInterface was sitting in the background this will cause screen1 to appear, it is only while screen1 is displayed that you can configure its controls.
send("pad hide")
send("sb hide")
send("b1 Action One!") 'this changes the text on button1 (b1) to read Action One!
send("b2 Action Two!")
send("b3 Action Three!")
send("b4 Action Four!")
'there, I have finished configuring screen1 into 'config1' mode. 
} 'end of config1() function.

Here is the actual sketch from my 'A little Scary' video ... please forgive the prehistoric programming techniques :slight_smile: I've never done C/C++ before.

#include <SoftwareSerial.h>
#include <Servo.h>
#include <stdlib.h>

Servo myservo;
SoftwareSerial softSerial(10, 11); // RX, TX
String command = ""; 
int r1 = 0;
int RelayPin = 2;
int val;
int pr1 = 3;
int pr2 = 4;
int pb1 = 5;
int pb2 = 6;


void setup()  
{
  Serial.begin(9600); //Remember to set the Arduino Serial Monitor to 9600 Baud and no line ending if you want to get AT commands to work before you connect. 
  softSerial.begin(9600); // SoftwareSerial "com port" data rate. JY-MCU v1.03 defaults to 9600.
  softSerial.println("Arduino Ready!"); 
  pinMode(2, OUTPUT);
  pinMode(pr1, INPUT_PULLUP);
  pinMode(pr2, INPUT_PULLUP);
  pinMode(pb1, INPUT_PULLUP);
  pinMode(pb2, INPUT_PULLUP);
  
  digitalWrite(RelayPin, LOW); 
  myservo.attach(9);
  }
  
void screen1set(){
 send("screen1");
 delay(300);
  
}
  
void loop()
{  
  if (Serial.available()) softSerial.write(Serial.read());
  while(softSerial.available() > 0) { // While there is more to be read, keep reading.
    command += (char)softSerial.read();
    delay(10);  
}

  if(command != "") Serial.println(command);
  
  if(command == "btinterface") screen1set(); //
  
  if(digitalRead(pr1) == LOW){
    send("say you pressed, red? 1.");
    delay(3000);
    send("say stand by. I shall initiate the turning on and off of relay 1.");
    delay(5000);
    send("say in. 5. 4. 3. 2. 1. ");
    delay(6000);
    command = "b1";
  }
  
  if(digitalRead(pr2) == LOW){
    send("say self destruct sequence aborted. phew!");
    delay(500);    
  }
  
  if(digitalRead(pb1) == LOW){
    send("say no? that was a blackwon. stupid?");
    delay(500);
  }
  
  if(digitalRead(pb2) == LOW){
    send("say self destruct sequence has been initiated. this system will self destruct in 30 seconds. press any red button to abort self destruct.");
    delay(500);
  }
  
  if(command.startsWith("sb")){ // Then the slidebar has been moved so alter the position of the servo!
    val = stringToNumber(command.substring(2));
    val = map(val, 100, 0, 0, 179);
    myservo.write(val);
    send("l4 " + command.substring(2));
  }
    
  if(command == "b2") {
   send("sms 07951123456 This apparatus will self destruct in 10 seconds!"); 
   digitalWrite(RelayPin, HIGH); 
 }
  
  if(command == "b1"){
    if(r1 == 0){
      r1 = 1;
      send("b1 Relay Off");  
      digitalWrite(RelayPin, HIGH);
      delay(500);
      return;
    }
    if(r1 == 1){
      r1 = 0;
      send("b1 Relay On");  
      digitalWrite(RelayPin, LOW);
      delay(500);
      return;
    }    
  }
    
  
  if(command == "b3") send("say Hello Ian. Remember to get to work on be tee interface?");
  
  command = ""; 
                                   
}// End Loop

int stringToNumber(String thisString) {
  int i, value = 0, length;
  length = thisString.length();
  for(i=0; i<length; i++) {
    value = (10*value) + thisString.charAt(i)-(int) '0';
  }
  return value;
}

void send(String s){
  softSerial.println(s);
}

Like the other app, the text output area is flawed in that it doesn't scroll to the bottom when you get new output

From this I deduce that you are talking about the Terminal screen (in my BTInterface app).

The Terminal screen will mostly be used for debugging to see exactly what your microcontroller sent over the bluetooth link.
There is a limitation to the Terminal screen which I don't plan on changing just yet and that is that if a line of text is too long it is lost off the right hand side of the Terminal screen.
You do get to see a bit more if you orient to landscape and in the future I may make it sideways scroll but just now this is a limitation.

While the terminal screen is being viewed, and it can be called up even from standby by sending the string 'terminal' to BTInterface, you can send the command 'clear' to clear it.
I would call it 'input' rather than output, that is when you receive something from the microcontroller into the terminal screen I'd say that was input and when you enter something into the send field and press send, i'd call that output but tomatoes potatoes :slight_smile: I did program it so that upon receiving 'input' :slight_smile: from the microcontroller its supposed to scroll down to the last line automatically. Is it not doing that for you? what device are you using?

The Terminal screen can be used for collecting data from a user, you could switch to the terminal screen:
send("terminal");

issue the clear command:

send("clear")

and then tell the user what you want:

send("please input your credit card details");
send("so that I may syphon off a bit");
send("thank you");

and after all this setting up your sketch would be waiting for the user to type something and press the Send button.

In the future I may introduce other 'screens' and cunningly call them names like screen2 screen3 etc. but I feel it necessary at the moment to test the waters with a basic version of BTInterface, get people using that and then see what the popular demands are before making any radical changes, always trying to keep new changes backwards compatible.

I think this first version does pretty good. I may introduce flashy texts and bold and italic and all-singing all-dancing colours and perhaps even have it vibrate when you stick it in your pocket which will be nice but not until I have a clear indication of the direction that people want it to go in :slight_smile:

When I get it to control my jet engine :slight_smile: oh yes... I will configure screen1 to have just the slidebar (to control the throttle) then b1 will be 'Bendix On' (for the bendix clutch 12v motor that spins the turbine) and when I press it, it will turn the motor on and change the text on b1 to read 'Bendix Off' etc. then b2 will read 'Gas On' which activates the electric valve for the butane/propane starter gas cannister then b3 will read 'Glow On' which turns on the glow plug.

I'm thinking of making b4 into 'Auto Start' so it'll do it all automatically and get the jet running up to a reasonable speed because I put the engine on the back of my moped :slight_smile: and its otherwise a bit awkward to do it manually when you're trying to navigate bumpy roads.

Jetduino :smiley:

While that might be interesting to some, to me it is over-complicating things. If I wanted to do complete custom programming, I would program the Android myself. I don't want to have to send text from the device to program the phone

As I said, I want a remote button interface that sends short sequences (typically 1 character) to the microprocessor at a distance. At the moment, I have one button that I want two different texts sent (one for the button being touched on the screen, and one for it being released), and several toggles where I don't need both up/down, just button being pressed. I want to have as little interaction with the phone as possible, and I need to be able to do it one handed on the phone. Typing in text is 4 different key motions on different parts of the phone, and I would not be able to do it while holding something else in my other hand. Yes, I could do this with a second microprocessor, but that requires another set of batteries, etc.

Yes, I have to think of making it basic and fundamental.

when you press button1 it sends b1 and that's pretty simple.
What you are suggesting would in any case require that you program it to send what you wanted it to send so I don't think being able to program the device to send different things when you pressed the buttons would make it simpler.

Having events like button pressed and button released doesn't work very well with a serial link because you would have to send a command which meant 'button one is now pressed' and then send another command with 'button one is now released' but because of the nature of sending text across a serial link and what with the timing issues of the whole serial setup I can't see that working. In any case that isn't the way I've designed BTInterface.

I want something that is easy and fun to use, in the same spirit as the Arduino :slight_smile:

My app is very simple, press buttons, configure screens. You might find that ArduinoCommander has more complex functionality that might be better suited to accurate timing.

BTInterface is the interface, just that, its not supposed to be the brain :slight_smile:

I've uploaded a new version of BTInterface.

I've taken your remarks to heart.

Firstly I've added the ability to choose the annoying sound effects that you wish to play on connection and disconnection of the Bluetooth module.
You can also choose '0' (zero) to have no sound effects and as these (16) sound effects are the same ones that you get by sending the sfx commands (sfx1 sfx2 sfx16) then this doubles up as a good place to try out the sound effects (press the little speaker icons to play the sounds).

Secondly I have added the ability for the micro controller programmer to determine what string is sent when the user presses a button.
This can, like the sound effects, be chosen in the settings (menu - settings) or it can also be done in code if the micro controller sends the string b1send b2send b3send or b4send so for example if when I press b1 I want the string 'activate' to be sent (instead of the string 'b1') then I'd program the b1 button by either doing it in the settings or sending the command over the serial connection:
b1send activate

Then each time I press the b1 button it will send that word 'activate' which you can see if you press it a few times then look at the log in the terminal screen.

Please note that I've only done this for the four user buttons at the moment as the game pad buttons are, well, game pad buttons :slight_smile: so remain as up, down, left, right & fire

I also did a considerable bit of work on the help system which is like a complete website inside the app :slight_smile:

Please let me know what you think and keep the suggestions coming.... and please join my forum :slight_smile: no-one's joined my forum yet ... well, only one has ... :frowning:

Quick update.

I have uploaded a new version that allows tablet owners to install it.

Plus I have figured out how to get it to work with PCs and Laptops!

http://btinterface.com/BTInterface/forum/viewtopic.php?f=2&t=23&p=40#p40

Yay!

I've just installed the beta on my phone. I'll have a play with it and provide feedback.

  1. if you configure the screen and commands from the uC then do you have to do this every time? I.e settings lost and each connected device configures the connected BTInterface screens?

  2. Is any particular version of Android required? I'd like to install in a cheap phone with PAYG SIM to provide mobile remote interface with the SMD ability.

It looks promisimg with some feedback to mature. :slight_smile:

Thanks

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 :slight_smile:

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

btinterface

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)

screenconfig1
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

b1Sub
if screenstate = 1 then turn on the motor
change b1 text to 'Motor Off'

etc .etc. etc. etc .

It's tremendous fun :slight_smile:

See my link about how to get it to work with a PC / Laptop just for trying it out :slight_smile:

V 1.06 is now out.

A search on google play store for arduino bluetooth finds it straight away :slight_smile:

It is still called BTInterface but I found that a lot more people can find it if I have words like arduino and bluetooth in the title.

I have re-designed the way in which BTInterface processes commands.

This is still Beta and I have a ways to go before it is perfect so please keep that in mind as you try it out and please keep those suggestions for improvements coming.

Thanks!

I have just installed the BTInterface, but I can't find anywhere to stop the annoying sound when connecting/disconnecting

Other than that it was very easy to get working. I use a HC-06 dongle