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

Acc/mag Device Initialisation section should have a working code example #75

Open
microbit-carlos opened this issue Feb 7, 2019 · 1 comment

Comments

@microbit-carlos
Copy link

Right now the pages list snippets of code from the uBit class:

storage(),
i2c(I2C_SDA0, I2C_SCL0),
display(),
accelerometer(MicroBitAccelerometer::autoDetect(i2c)),
compass(MicroBitCompass::autoDetect(i2c)),
compassCalibrator(compass, accelerometer, display, storage), // Storage is optional
i2c(I2C_SDA0, I2C_SCL0),
accelerometer(MicroBitAccelerometer::autoDetect(i2c)),

Which illustrate the description, but is not valid code users can copy and paste.

We had more than a couple queries either via support system or email asking about this, so maybe we should change these to working examples, similar to the kind of code that would appear in the "Using Components Directly" section (https://lancaster-university.github.io/microbit-docs/advanced/#using-components-directly).

@microbit-carlos
Copy link
Author

microbit-carlos commented Feb 7, 2019

Related to #54 "Compass and accelerometer docs need updating to dal v2.1 instantiation mechanism".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant