Skip to content

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

@alexandru-cohal

Description

@alexandru-cohal

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 Arduino_MKRIoTCarrier Library version 0.9.6.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions