I use arduino nano ble 33 sense, it has 2 com port, i upload my code in one of this and the code runs in the second one . I have problem because arduino ide recognize now only the second port and when i upload code it doesn't run
can anyone hepl me
Install your board's Package Core, it contains the board's driver
Double tap the reset button fast and check the status of the onboard "L" LED. If the onboard LED fade in and out slowly (pulsating), upload an example sketch (Blink LED) from the IDE to the board.
I uninstalled the arduino IDE as @Dozie said and re-installed it.I ran Blink Led sketch and it works correctly,when i upload my code it gives me the same error.Specificly now while uploading the code the arduino disconnects,i press twice the reset button and then notifies me that the code is uploaded but in serial monitor doesn't gives any result.
My sketch is:
#include <Arduino_LSM9DS1.h>
unsigned long lastTime = 0;
unsigned long currentTime = 0;
float dt = 0.0;
float Xg =0 ; // Gyroscope readings
float Yg =0;
float Zg =0;
float Xa =0; // Angular position in degrees
float Ya =0;
float Za =0;
void setup() {
Serial.begin(9600);
}
void loop() {
if (IMU.gyroscopeAvailable()) {
IMU.readGyroscope(Xg, Yg, Zg);
// Calculate time elapsed since the last measurement
currentTime = millis();
dt = (currentTime - lastTime) / 1000.0; // Convert to seconds
// Integrate gyroscope data to calculate angular position
Xa += Xg * dt;
Ya += Yg * dt;
Za += Zg * dt;
// Print angular position
Serial.print('Angle X: ');
Serial.print(Xa);
lastTime = currentTime;
}
}
It has no error in compile.Can anyone help me??
Do you have a Rev1 or Rev2 version of the nano ble sense?
See this FAQ about the library change needed for the imu.
What is the difference between Rev1 and Rev2?
There has been some changes in the sensor between both revisions:
Replacement of IMU from LSM9DS1 (9 axis) for a combination of two IMUs (BMI270 - 6 axis IMU and BMM150 - 3 axis IMU).
Replacement of temperature and humidity sensor from HTS221 for HS3003.
Replacement of microphone from MP34DT05 to MP34DT06JTR.
Additionally some components and the changes have been done in order to improve the experience of the users:
Replacement of power supply MPM3610 for MP2322.
Addition of VUSB soldering jumper on the top side of the board.
New test point for USB, SWDIO and SWCLK.
Do I need to change my sketch used in the previous revision?
For sketches done using the libraries like LSM9DS1 for the IMU or HTS221 for the temperature and humidity sensor, for the new revision this libraries must be changed to Arduino_BMI270_BMM150 for the new combined IMU and Arduino_HS300x for the new temperature and humidity sensor.