B4R Question HC 05 Classic Bluetooth Example --> phenomenon

newbie

Member
Licensed User
Longtime User
Hi,

i am using the example with an Arduino DUE

when i define in the sample code a array of pins like
B4X:
 Private leds(40) As Pin

and init this array in the AppStart like
B4X:
 For i= 0 To 40
    leds(i).Initialize(i,leds(i).mode_output)
    leds(i).DigitalWrite(True)
  Next
then i have two problems:

1)
no data was send with the stream !!!
init up to 15 ports it works correctly
I have try to increase the StackBufferSize without success

2) the logging dont work

any suggestions ????
 

newbie

Member
Licensed User
Longtime User
Does the Bluetooth example as-is work?

Hi Erel,
Yes, the example as-is works. (on the Android side i have sometimes connection-problems: i open a new trade for this in the B4A-Forum)

On this morning i have try something and locate the cause
The problem is when i init Digital-Pin 0 and 1
When i don' use this pins all works fine.
 
Upvote 0

newbie

Member
Licensed User
Longtime User
Some pins are used for all kinds of things. For example pins 0 and 1 are used by the default Serial object. This means that if you write to those pins then the serial output will be broken.
Also make sure not to use the pins that are used by the Bluetooth module.
In this case the pins 0 and 1 was not used by Bluetooth module or other !
 
Upvote 0
Top