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

Using components directly page needs updating for the new sensor initialisation #74

Open
microbit-carlos opened this issue Feb 7, 2019 · 0 comments

Comments

@microbit-carlos
Copy link

https://lancaster-university.github.io/microbit-docs/advanced/#using-components-directly

Given example:

#include "MicroBit.h"

MicroBitI2C i2c = MicroBitI2C(I2C_SDA0, I2C_SCL0);
MicroBitAccelerometer accelerometer = MicroBitAccelerometer(i2c);
MicroBitDisplay display;

int main()
{
    while(1)
        display.scroll(accelerometer.getX());
}

We need to update it to use MicroBitAccelerometer::autoDetect(...) instead.

@microbit-carlos microbit-carlos changed the title Using components directly needs updating for the new sensor initialisation Using components directly page needs updating for the new sensor initialisation Feb 7, 2019
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