My Apps just running 30 seconds then hang

areripe

Member
Licensed User
Longtime User
Hello, sorry if I put my thread at wrong place. Because im new here. Im using DF Bluetooth v3 at 9600 boudrate to arduino.

But what happening here is, the data send from android to arduino is slow.
it takes 2 second delay to send to motor. And from arduino Im using DF robot motor controller.

And about the main problem is, my apps will run 30-40 seconds and then HANG or getting slower which means like not responding.
Really NEED HELP ASAP BECAUSE I NEED TO PRESENT THIS APPS ON SUNDAY GMT+8
PLEASE HELP ME

This is my code for basic4android
 
Last edited:

areripe

Member
Licensed User
Longtime User
Code

Here is my code, i cant upload via basic4android because the size exceed. Here's the link on mediafire.
of basic4android code and arduino code

myapp.zip
http://www.mediafire.com/view/?tvzazw9yv17hhdy

By the way, im using samsung galaxy s2. And 1 werid thing when i install this apps on my samsung galaxy tab, the connection between bluetooth and TAB refused.
Arduino Uno
DF 2A Dual Motor Controller
DF bluetooth v3
Samsung S2
Galaxy Tabs 2
 
Last edited:

areripe

Member
Licensed User
Longtime User
Im sorry,
Already attached the zip file, hope you can help me. Thanks
I cant attach the files via basic4android because size exceed.
here the mediafire links
myapp.zip
 

NJDude

Expert
Licensed User
Longtime User
I'm having some problems runing your app.

1- If I don't have BlueTooth on I get a msgbox with an error, if I activate BlueTooth I get THIS error.

2- You have to remove the following lines out of the If FirstTime Then ...
B4X:
Activity.LoadLayout("Main")
Serial1.Initialize("Serial1")
timer1.Initialize("Timer1", 1000)

Having those lines in FirstTime means that those lines will execute ONLY THE FIRST TIME your app runs.

3- It seems your app is for something specific, I can see a device when I tap on the "Find Device" button, but tapping on it displays THIS error after a few moments.
 

areripe

Member
Licensed User
Longtime User
1. I never saw that error yet, im only get error when I try to connect samsung galaxy tab 2 with the apps. And the error code
java.oi.IOException : the connection have been refused.

2. If I remove that 3 lines, should I put it where? In activity_resume?

3. You need firstly paired the bluetooth adapter first in setting.
Then should be no problem with that error
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…