-1

My objective is to get both data from VN200 GNSS/INS sensor (using GPIO14/15) and heart rate monitor strap Polar H10 (using Bluetooth) at the same time for synchronization.

Bluetooth on pi zero w by default use UART.

$ ls -l /dev/serial1
... /dev/serial1 -> ttyAMA0

$ ls -l /dev/serial0
No such file ...

After I switched Bluetooth mini-UART by adding these code to /boot/config.txt

dtoverlay=miniuart-bt
enable_uart=1
force_turbo=1

Now I got.

ls -l /dev/serial0
... /dev/serial0 -> ttyAMA0

ls -l /dev/serial1
... /dev/serial1 -> ttyS0

I want to use GPIO14/15 for primary UART to read data over VN200 sensor and bluetooth over mini-UART for reading data from heart rate strap. However, I noticed that both the ttyS0 and ttyAMA0 use same GPIO14/15 from this post, which either of them can be use.

My question is

  • For certainty, is it possible to read 2 data at the same time? I doubt not.
  • Do I have to use Bluetooth USB dongle for read HR data.
4
  • 1
    Does this answer your question? How do I make serial work on the Raspberry Pi3 (PiZeroW, Pi4 or later models)
    – Milliways
    Commented May 5, 2023 at 22:36
  • @Milliways I use the heart rate strap: Polar Heart Rate Monitor. I checked that link alrrady. I can switch Bluetooth to mini UART but it still uses the GPIO 14/15 which I cannot simultaneously read 2 data, am I right. Also for adapter did you mean USB bluetooth? Commented May 5, 2023 at 22:56
  • GPIO 14/15 are the only accessible UART pins - which can be either UART.
    – Milliways
    Commented May 6, 2023 at 0:27
  • @Milliways Sorry. I have now clarified the question. Please see the update Commented May 6, 2023 at 8:28

2 Answers 2

0

Your question is unclear as you have not elaborated what the "heart rate strap" requires.

It is only possible to use 1 serial port but you can use Bluetooth with mini UART. If you require 2 accessible UART you will need an additional adapter.

The Answer in the duplicate explains UART and how to swap although (unless your application requires high speed and/or parity) I have never found a need to swap UART.

0

For the Bluetooth communication with the Polar H10 heart rate monitor, using the mini-UART (ttyS0), you can use a Bluetooth library like BlueZ or other Python libraries that provide Bluetooth functionality. Make sure to pair and connect to the Polar H10 device using the Bluetooth address or device name.Bluetooth USB dongle should not be necessary in your current setup.

In case you want to make a GNSS HAT for a full fledged Raspberry pi, you can follow this design of GNSS HAT.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.