a mapping robot that sends x and y axis to mit app inventor and drawing it map.

17 views
Skip to first unread message

Dani Hananis

unread,
May 1, 2019, 3:26:49 PM5/1/19
to MIT App Inventor Forum

hello ive got a scholl project.
im making a real time mapping robot . ive got 2 main problems:

1. im sending the data in bluetooth proctocol from STMf4 to the smurf phone, the data sended is  location of the robot in x ax, y ax, and robot angle.
the data sends as string with "|" seperade between the data.
now metter what ive tried. the data that im sending, 80% of the time getting wrong.and that is harmin my mapping. what can i do to "confirm " the data who sended from the STM to the app.

2. next problem is when the "robot" in the canvas is reaching to the edge, i need to kind of zoom out the canvas that there is more space for the image of the robot to continue his mapping and not to get stuck in the edge of the canvas. what can i do about it? is there a thing like a auto scrolling canvas maybe?

thank for the helper. i realy needthat help, ive got the exam on the project in 2 weekes so u will realy help me.

ABG

unread,
May 1, 2019, 6:11:34 PM5/1/19
to MIT App Inventor Forum
Post your exported .aia file, your .ino file, and your Downloaded Blocks Image.

You separate your ax and ay with '|',
but what do you use to separate your messages
so they don't get broken up by the Clock.Timer?

Here's a summary of how to insure messages arrive whole ...

Use println() to separate messages when you transmit.
Set Delimiter = 10 in BlueTooth Designer.
Check for Bytes Available > 0 in blocks,
but then request -1 bytes to get only full  messages.

Canvas Larger than Screen ... see
(from AI2 FAQ Canvas section)

ABG

Reply all
Reply to author
Forward
0 new messages