Hello,
My idea is to run a maximum of High/Lowe output from Arduino Mega 256,
according to the distance (same room, far, far away) the GSM does the job and if I close Bluetooth does the work
So far I run more than 50 input/output, all this is just an exercise and goes well with all GSM SIM900,
You can see a picture here:
http://forum.arduino.cc/index.php?topic=252733.msg1830283#msg1830283
So I'm on the Bluetooth part that will work when I'm near, I may be using the WIFI also
I used bluetooth.zip for the B4A part as a sample to start
Bluetooth.zip to Arduino works correctly, but not the Arduino to B4A
I cant implement it on B4A to ARDUINO
in fact the last three line cuts the Bluethooth and it stop,
The Arduino Mega code:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
I'm not sure what to put as a function to receive the characters in B4A,
yet the code works perfectly for B4A to Arduino but not the other way
Thank you for your interest if you give me a track
kind regards
Henry
			
			My idea is to run a maximum of High/Lowe output from Arduino Mega 256,
according to the distance (same room, far, far away) the GSM does the job and if I close Bluetooth does the work
So far I run more than 50 input/output, all this is just an exercise and goes well with all GSM SIM900,
You can see a picture here:
http://forum.arduino.cc/index.php?topic=252733.msg1830283#msg1830283
So I'm on the Bluetooth part that will work when I'm near, I may be using the WIFI also
I used bluetooth.zip for the B4A part as a sample to start
Bluetooth.zip to Arduino works correctly, but not the Arduino to B4A
I cant implement it on B4A to ARDUINO
in fact the last three line cuts the Bluethooth and it stop,
The Arduino Mega code:
			
				B4X:
			
		
		
		// **********************************************
// Module HC06 with bluetooth sending AT commands
// And display the Result © response module
// Code http://nicolasz68.blogspot.fr/2012/09/module-bluetooth-jy-mcu-v104-pour.html
// *********************************************** / *
#include <SoftwareSerial.h> // Software Serial Port
#include <string.h>
#include <PRINT.H>
#include <serial.h>
10 // #define RxD Pin 10 RX (pin0 = serial) Green 19
11 // #define TxD Pin 11 TX, you can change black 18
SoftwareSerial BTSerie (RxD, TxD);
String msg = String ("");
void setup ()
{
   Serial.begin (9600); // 115200 if you want
   delay (500);
   Serial.println ("Hello - Ready for AT commands");
   // Setup bluetooth
   pinMode (RxD, INPUT);
   pinMode (TxD, OUTPUT);
   BTSerie.begin (9600); // 57600
   delay (500); // 1200
   BTSerie.print ("AT + VERSION"); // Ask the NÂ ° version
   delay (500);
   BTSerie.print ("\ n");
}
void loop ()
{
   // We read character by character on BTSerie and to Repeat on the Terminal Series
   recvChar tank;
   String msg;
   if (BTSerie.available ()) {
    while (BTSerie.available ()) {// While There is more to BE read, keep reading.
      recvChar = (unsigned char) BTSerie.read ();
      msg + = String (recvChar);
    }
      Serial.print (msg);
      Serial.println ("");
      msg = "";
   }
   // if (BTSerie.available ()) {
   // while (BTSerie.available ()) {// While There is more to BE read, keep reading.
   // msg + = (unsigned char) BTSerie.read ();
   } //
   if (Serial.available ()) {
     recvChar Serial.read = ();
     BTSerie.write (recvChar);
     //BTSerie.write (Serial.read ());
   }
      //Serial.print(msg);
}I'm not sure what to put as a function to receive the characters in B4A,
yet the code works perfectly for B4A to Arduino but not the other way
Thank you for your interest if you give me a track
kind regards
Henry
 
				 
 
		 
 
		 
			 
			 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		