HELP - Accelerometer sensor (the actual measurements on the chart), do not know what's wrong

I am not convinced you are receiving any data over BlueTooth.
Either that, or your BlueTooth input stream included a test announcement from you that it was starting up.

In your Clock Timer that asks for and processes messages, instead of
processing each message, JOIN it to a Label.Text and show us the results.

You might need the help of a hardware guy on this.
Prepare to upload a wiring diagram.

Hmmm, i do not know what you mean to "JOIN" to Label.Text.
Sorry, like i said im still learning.

You wrote about wiring diagram so in the attachments i send two schemes showing how everything is connected. It's a simple layout. Of course, the cable from ESP32 is connected to the USB of the laptop.

Let's go all the way back to your first post, with your Arduino code.

You have 3 components you talk to for I/O:

  • Wire
  • Serial
  • SerialBT

I see you printing to Serial, but not to SerialBT.
Coincidentally, the program image you posted with a data stream is titled COM4, which sounds like a PC port name. You have print commands in your sketch to send to Serial, but not to SerialBT.

The name SerialBT has BT in it, so I am going to guess that's the port you should be printing to in order to get it to go out on BlueTooth.

Could it be as simple as this?

P.S. Here are some draggable blocks to just show the input stream, without trying to plot it.
They should validate my hypothesis.


By The Way, I am confused by the different ways you begin serial transmission for Serial and SerialBT. For one of them, you set a bps rate number, and for the other you pass it a piece of text? See attached.

1 Like

@ABG

Sorry for not responding but I was on vacation.

After the last message, I understood the mistake I had made. After changing the code in arduino, the application started to record vibrations in the axes, so everything was fine :heart:. Only the thickness of the line (green, red and blue) is a bit thin and not very visible. Is there any easy way to change this?

One more question, do you know if it is possible to switch two sensors on one screen? I mean adding a second sensor and creating two buttons at the bottom of the phone screen that allow you to change them, for example "sensor1" and "sensor2" and depending on which I click, it would show the readings. Will it be difficult?

Because from what I read on the internet, adding another screen in the application and turning on a second sensor there, I would have to connect to bluetooth again, which would be very inconvenient.

component_set_get

See the code I posted earlier for keeping the last 5 lines of data received.

Imagine you had a way to separate out the two sensor readings from each incoming message.
Keep a separate global list for each sensor's readings, with a limit (100?) on how many readings to keep in each sensor's list.

When you click a button to graph a sensor, clear the graph canvas (optional) , change your color, and run down the appropriate list graphing the readings.

1 Like