I am working on a project, and my goal is to send a string command from app inventor to arduino via bluetooth to control a dc motor. There are available applications and examples on how to control a dc motor using buttons "ON" and "OFF" in android. But in this project, I need to be able to control a dc motor using text strings.
For example, when I input "abc" in the textbox and click "Print", the dc motor connected to arduino should: rotate clockwise, stop (x sec, x = depends on delay time), rotate counterclockwise, stop (x sec), stop, stop (x sec)
Note: a = clockwise
b = counterclockwise
c = stop
What I did in my app inventor code is this:
Input a set of strings (say, a paragraph) inside the textbox.
Then, when "Okay" button is clicked, it will process the text inside the textbox and split each letter into a list.
After that, I wanted to check if it actually appears in list form, so I printed the results into the spinner.(optional)
I need to send the data from the list, one at a time, to arduino via bluetooth. How do I do that? This approach of mine isn't working the way I expect it to do..
Thanks a lot! Any help would be highly appreciated!