Nano 33 Sense BLE

Hi. I want to send sensor data from my Nano 33 Sense BLE to a Raspberry Pi. It seems the serial port on Nano is not available as it is taken by the USB function for serial monitor. I tried to use Rx/Tx pins but they dont seem to be working. The softserial library is not available for my board. Dont know where to go with this now. I dont want to use BLE. Here is the example I am using.

[code]
#include <Arduino_HTS221.h>
#include <Arduino_LPS22HB.h>

void setup() {
    Serial.begin(9600);
    while (!Serial);
    
    if (!HTS.begin()) {
        Serial.println("Failed to initialize humidity temperature sensor!");
    
    if (!BARO.begin()) {
        Serial.println("Failed to initialize pressure sensor!");
        while (1);
    }
        
    }
}

void loop() {
    // read all the sensor values
    float temperature = HTS.readTemperature();
    float humidity    = HTS.readHumidity();
    float pressure = BARO.readPressure();
    // print each of the sensor values
    Serial.print("Temperature = ");
    Serial.print(temperature);

[/code]
 So I need to get data from Nano to RPi. Thank you in advance.

Unlike the classic Arduino Nano, the RX and TX pins on the Nano 33 BLE are Serial1, not Serial. So if you want to communicate over those pins, you can just use Serial1 in your code where you would usually use Serial when using Serial Monitor.

Thank you it is now working.

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.