Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Ball/Ball.cpp
- Revision:
- 15:1564bd6b713d
- Parent:
- 14:108052b6222b
- Child:
- 17:5104ecef5bd0
--- a/Ball/Ball.cpp Sun Apr 14 16:40:51 2019 +0000 +++ b/Ball/Ball.cpp Mon Apr 15 07:29:35 2019 +0000 @@ -20,6 +20,7 @@ void Ball::update(FXOS8700CQ &accelerometer){ int RADIUS = get_radius(); Data values = accelerometer.get_values(); + printf("ax = %f | ay = %f\n", values.ax, values.ay); _velocity.x = -5*values.ay; //axes of the accelerometer are different to orientation of the screen _velocity.y = -5*values.ax; //negative to account for reversed direction _x += _velocity.x;