Arduino Forum

Using Arduino => Interfacing w/ Software on the Computer => Topic started by: ariefrizkyr on Jun 14, 2015, 05:23 am

Title: [RESOLVED] Controlling Arduino from Android App over Bluetooth
Post by: ariefrizkyr on Jun 14, 2015, 05:23 am
I have a padlock project which controlled from smartphone over Bluetooth. I created the app using MIT App Inventor but got a little problem.

So here's how the app works :

1. The user picks using the list picker the paired Bluetooth (which is the padlock) then it will unlock the padlock (the servo set to 60) and will set the status to UNLOCKED.
2. The list picker will be replaced with the button.
3. When the switch button triggered from the Arduino, it will receive the byte available and will set the status to LOCKED.

It works up until there. However, when I click the button on the app, the status will remain LOCKED instead of UNLOCKED as it suppose to.

How to fix it? Kindly check the attachment for the MIT App Inventor blocks. Thank you in advance.
Title: Re: [URGENT] Controlling Arduino from Android App over Bluetooth
Post by: PaulS on Jun 15, 2015, 11:28 pm
Quote
How to fix it? Kindly check the attachment for the MIT App Inventor blocks. Thank you in advance.
You are assuming that the Arduino code is working perfectly. That is NOT an assumption that I am willing to make, concerning code I can not see.
Title: Re: [URGENT] Controlling Arduino from Android App over Bluetooth
Post by: Robin2 on Jun 16, 2015, 10:01 am
Shouldn't you be asking App Inventor questions on the App Inventor Forum ?

Have you seen this RemoteXY (http://forum.arduino.cc/index.php?topic=262419.0) thread ?

...R
Title: Re: [URGENT] Controlling Arduino from Android App over Bluetooth
Post by: MartynC on Jun 16, 2015, 03:41 pm
Have a look at arduino-and-hc-06-zs-040 (http://www.martyncurrey.com/arduino-and-hc-06-zs-040/) and arduinobtcontrol (http://www.martyncurrey.com/arduinobtcontrol/). Both are examples of connecting the Arduino to Andriod using mit ai. All files are available for download

Title: Re: [URGENT] Controlling Arduino from Android App over Bluetooth
Post by: Robin2 on Jun 16, 2015, 08:50 pm
Looks like it was not URGENT after all.

...R
Title: Re: [URGENT] Controlling Arduino from Android App over Bluetooth
Post by: ariefrizkyr on Jun 17, 2015, 12:41 am
Dear all,


Thank you very much for the replies. I've fixed the issue. The problem was my blocks in MIT App Inventor and not the Arduino code. Thank you.