Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AE-199] Example sketches do not pass at IMU.begin() #40

Open
aliphys opened this issue Nov 9, 2023 · 1 comment
Open

[AE-199] Example sketches do not pass at IMU.begin() #40

aliphys opened this issue Nov 9, 2023 · 1 comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@aliphys
Copy link

aliphys commented Nov 9, 2023

I have compiled and uploaded the three following sketches, on two different laptops:

In all cases, the examples are compiled and uploaded without error. However, there is no output to the Serial monitor at all.

However, if Serial.println("Hello! 1") and Serial.println("Hello! 2") is added to the SimpleAccelerometer.ino sketch as follows:

void setup() {
  Serial.begin(9600);
  while (!Serial);
  Serial.println("Hello! 1");
  if (!IMU.begin()) {
    Serial.println("Failed to initialize IMU!");

    while (1);
  }
 Serial.println("Hello! 2");

  Serial.print("Accelerometer sample rate = ");
  Serial.print(IMU.accelerationSampleRate());
  Serial.println(" Hz");
  Serial.println();
  Serial.println("Acceleration in g's");
  Serial.println("X\tY\tZ");
}

Then only Serial.println("Hello! 1") is printed to the Serial monitor.

The latest version of the library 2640521 was used, with the following command in Windows.

arduino-cli compile -u -p COM7 --fqbn arduino:samd:nano_33_iot --library ".\"  ".\examples\SimpleGyroscope\SimpleGyroscope.ino"

I would expect the code to continue past !IMU.begin(), giving an error if it fails to initialise.

@aliphys
Copy link
Author

aliphys commented Nov 9, 2023

Possibly related to

This issue also affects the tutorial for the Nano 33 IoT Accelerometer in the Docs website: https://github.com/arduino/docs-content/blob/main/content/hardware/03.nano/boards/nano-33-iot/tutorials/imu-accelerometer/content.md

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants