Sending Data to and from MIT app to Arduino via bluetooth (HC05)

The actual problem is the board would need to have a huge amount of extra code to receive the data in a different format.

In an earlier post I sent you a link to an App on the gallery. You can study the code of that App.

Yes

their app looks good but I don't see anyway of being able to see their MIT app developer blocks to help me with the problems I am having.

Are you able to help me identify some of the problems in my MIT app inventor blocks? if not completely understandable, ill try something else, but, what you are suggesting in terms of redoing everything like the app sent above isn't an option due to time constraints.

I can't help you to fix what you have but I don't think it's less work to try to fix the current method than it is to replace it, in my opinion the method is flawed. I have my own time constraints and when I'm on the forum, others to help too - we are a small team serving a lot of people.

@Ryley
I have verified that the TinyDB correctly obtains the SAVE positions, for example (90 70 32 32 54 64 34 43 53 43 54 65 65 32 67 65 34 98), a list that is a multiple of 6 since they are saved 6 by 6 servos.

Send the data using a for loop, I don't think it's a good option with App Inventor, since AI2 has a particular way with events. A Clock would be better and send the data every so often.

delayeee

In the runSteps function I see many delays, in such a way that a servo must wait for another one to finish to start its movement, if during this time the application sends a data, the Bluetooth may not receive it.

I think it would be a good idea to do a simple debug, for example to have a TinyDB with a simple AllPositions = (40 50 60 70 80 90)
. Click a button and send those values ​​to make the servos move.
You can send the 6 values ​​at the same time and try to move the servos at the same time, this would be more complicated, since if you use "delay" one servo must wait for the other.
Or better to send one by one the position of each servo, when a servo ends it returns a position of "I_posicioned", and start the movement of the next servo.

To debug, simplify the runSteps code, eliminate the RUN, PAUSE, RESET.

Anyway another way to do it would be by angle, in a servo you can indicate the angle and the axis will move to that angle, it is not necessary to do an j++

Look at the first example, in the Serial Monitor I write 45 and the servo will move to the angle 45 of its axis.
http://kio4.com/arduino/28servo.htm

1 Like

here is an amazing article on Connect your Phone to Arduino through Bluetooth hc05 module a flexible aap and super easy code might help you guys

Hello Nena

With respect, we can connect to an HC05 blindfolded. The article you link to is more of an advertisement for an App (no Android code shared), probably does not use App Inventor and has nothing to do with robot arms and servos.

1 Like

2 posts were split to a new topic: Bluetooth, I do not see the list of devices