[Closed] Review, debug and correct existing B4A project.

Beja

Expert
Licensed User
Longtime User
A small project with only one activity.
(Must have) Arduino board and HC-06 Bluetooth module for testing. You have done Android and Bluetooth communication projects.
Reward $100..
If interested, PM me for details.
 

Cableguy

Expert
Licensed User
Longtime User
Hi @Beja, what exactly do you need done? I have the hardware
 

Cableguy

Expert
Licensed User
Longtime User
but i think that there is not much difference.
The HC-06 can only work as a Slave (if I recall correctly) while the HC-05 can be both Master as Slave
 

Beja

Expert
Licensed User
Longtime User
Didn't you have at the B4R Example projects booklet ?
It contains several example projects with an HC-05 Bluetooth module instead of an HC-06 Bluetooth module, but i think that there is not much difference.

Yes Klaus, you are right when you say there'e no difference.. because since the Android device has the master Bluetooth, then both will work, because the HC-05 is initially in slave mode. That said, Long ago, I built that example.. my current project has a part that uses Bluetooth, when the Arduino sends a "1" to the Arduino through the Bluettoth, it will turn an LED ON for 100 Ms then turns it off automatically. (a 100 ms pulse). a "2" command will do the same but it turns another LED On and then off after 100ms. Another thing, I will hardode the Bluetooth MAC address, so there's no scan or discover or even Connect button. it will connect automatically on power-on. The only button is to send the "1" or "2"
Best regards, and thanks for the time -b
 

Beja

Expert
Licensed User
Longtime User
Sub Process_Globals
.
.
.
Private Const MAC As String = "nn:nn:nn:nn:nn:nn"
End Sub
Then..
Sub ConnectToHC06
Serial1.Initialize("")
Serial1.Connect(MAC)
End Sub

But for some reason this didn't work
 

Cableguy

Expert
Licensed User
Longtime User
serial1 is used for debug by usb...
You can use any other TX/RX pin pair available, but you need to use the rSoftwareSerial internal library for that

1751994871913.png
 

Cableguy

Expert
Licensed User
Longtime User
@Beja, as I said, I have a HC-06 (or 05, I can't recall) and some ESP2866 and ESP32 so I can try and help you debug... we can eve make it a collab if you so wish...
 

Beja

Expert
Licensed User
Longtime User
Thanks but I am using Ardino Nano, not esp32
 

Beja

Expert
Licensed User
Longtime User
It is quite some time that i have not played with B4R.
Therefore i am a bit embarrassed to answer you.
The HC-05 examples use BluetoothAsynchStream class to communicate.

Thanks Klaus..
I read the projects on booklet but didn' build the examples.. that's why the information is not stored in my memory :) I will go back and try to tweak the example to fit into my current project..
@Cableguy ..Thanks and I will be in touch.. hopefully things work
 

Beja

Expert
Licensed User
Longtime User
This is now closed.. Thanks to Klaus and Cableguy for their valiable advices and guidance.
 
Top