At the beggining, the project looks like this:
I connected the ESP32 with via usb to the computer and then connected the ADXL345 sensor to it.
I want to create a phone application with MIT APP INVENTOR in such a way that the movements of the X, Y, Z axes are recorded in the form of a graph that records the actual sensor vibrations.
I have already created code blocks in MIT APP INVENTOR and code in "Arduino" but then the application I am downloading is not working properly and is not reading any sensor data.
In the photos attached I present the blocks from the MIT APP INVENTOR and the code from "Arduino". Additionally, I add a photo of the readings from the serial port monitor.
I notice in your Clock Timer routine you clear the canvas after receiving each x,y,z value.
That would make for a short graph, right?
Also, you only process incoming data after you have passed the end of the x axis?
For good measure, add each incoming complete message to a list and show it in a List Picker Elements, as a log.
If you are getting no data at all, check your BlueTooth Client Delimiter value in the Designer.
It should be 10, to allow automatic recognition of Line Feeds.
If that does not help, 9600 bps is a more common standard for serial traffic.
Oh yeah, right, I clear the canvas after receiving each x, y, z value, so is it wrong?
"For good measure, add each incoming complete message to a list and show it in a List Picker Elements, as a log."
I'm quite new in MIT APP INVENTOR, could you show what you excatly mean by all you wrote above? I mean by screens or whatever. I do not want to change anything what you didn't suggest.
I have Delimiter Byte on 10, so it was good.
If nothing help i will change to 9600 bps.
The project is about to be simply a vibration recorder in the X, Y, Z axes and that's it.
P.S. These blocks can be dragged directly into your Blocks Editor workspace.
You never started your Clocks.
I started the plotting clock at connection time for you.
Your if/then in the plot clock was blocking the input capture under an irrelevant test.
I understand, I changed everything as you added in the screenshots above, but still something is wrong. At this point, after connecting bluetooth with ESP32, the entire application screen does not work (i.e. wherever I click, nothing changes - back button, checkboxes, whatever).
I have changed the sign as you wrote above, but there is still something wrong and an error pops up after connecting to bluetooth to ESP32.
In the link above, I am sending you a recording from the phone.
Okey, I changed as in your attached pictures but unfortunately the same error still occurs as I posted above.
The application turns on, bluetooth is connected to ESP32 and it looks like the error was somewhere when turning on the readings, because without the checkboxes enabled, the error does not pop up, but after turning on any checkbox, the error shows again.
I try different possibilities myself, but I still can't figure out what else to change and I back to your recent suggestions for the app.
In the attachment I am adding the file "aia" after the last changes.
Sorry for the further spam, but I really want to finish the project.
Since your error is in list processing against a split of the input, you were in need of extra code to check if the splits worked before doing list selects.
Add a Notifier1 to your Design screen, and pull in this enhanced procedure.
Upload the error message here if it is not obvious.