arduino / Arduino

Arduino IDE 1.x
https://www.arduino.cc/en/software
Other
14.14k stars 7.01k forks source link

Website - Code Error - Opla IoT Kit - Getting Started Project - Get To Know The Carrier - Acceleration Reading #11009

Closed alexandru-cohal closed 3 years ago

alexandru-cohal commented 3 years ago

The Opla IoT Kit "Get To Know The Carrier" project is available on this page: https://opla.arduino.cc/opla/module/carrier/lesson/get-to-know-the-carrier

In the "Core programming terms" section, "Loop" subsection, there is a code snippet with commands for reading the sensors available on the MKR IoT Carrier. For reading the acceleration provided by the IMU sensor, the following command is provided

carrier.IMUmodule.readAccelerometer(accelerometer_x, accelerometer_y, accelerometer_z); //read accelerometer (x, y z)

which generates the following error

error: 'class LSM6DS3Class' has no member named 'readAccelerometer'; did you mean 'readAcceleration'?

As suggested in the error and also explained in the documentation of the LSM6DS3 library of the IMU sensor, the readAccelerometer method should be replaced with the readAcceleration method.

I am using the Arduino Web Editor with the _ArduinoMKRIoTCarrier Library version 0.9.6.

karlsoderby commented 3 years ago

Thank you @alexandru-cohal for reporting. This issue will be fixed shortly.

per1234 commented 3 years ago

@karlsoderby did you ever get a chance to fix this error? I see it is still there on the tutorial.

karlsoderby commented 3 years ago

@per1234 just updated the platform, replacing readAccelerometer with readAcceleration. Thanks for the reminder, it had avoided previous updates somehow!