Go Down

Topic: [RESOLVED] Controlling Arduino from Android App over Bluetooth (Read 1 time) previous topic - next topic

ariefrizkyr

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.

PaulS

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.
The art of getting good answers lies in asking good questions.

Robin2

Shouldn't you be asking App Inventor questions on the App Inventor Forum ?

Have you seen this RemoteXY thread ?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

MartynC

Have a look at arduino-and-hc-06-zs-040 and arduinobtcontrol. Both are examples of connecting the Arduino to Andriod using mit ai. All files are available for download


Robin2

Two or three hours spent thinking and reading documentation solves most programming problems.

ariefrizkyr

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.

Go Up