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: Accelerometer.cpp
- Revision:
- 4:437778dbdf8c
- Parent:
- 2:f81ab5d2f0a2
- Child:
- 5:de016948db9c
diff -r f81ab5d2f0a2 -r 437778dbdf8c Accelerometer.cpp
--- a/Accelerometer.cpp Mon Feb 15 21:48:42 2021 +0000
+++ b/Accelerometer.cpp Sun Feb 28 03:25:13 2021 +0000
@@ -3,7 +3,7 @@
#include "PinAssignment.h"
//Constructor
-Accelerometer::Accelerometer(int freq) : Panel(PIN_ACCEL_PANEL),R1(PIN_ACCEL_R1),
+Accelerometer::Accelerometer() : Panel(PIN_ACCEL_PANEL),R1(PIN_ACCEL_R1),
R2(PIN_ACCEL_R2),acc(PIN_SDA,PIN_SCL)
{
//Set Output Control
@@ -13,7 +13,7 @@
//Initialize I2C
I2C i2c(D14,D15);
- i2c.frequency(freq);
+ i2c.frequency(ACC_FREQ);
//Set Range
acc.setAcceleroRange(MPU6050_ACCELERO_RANGE_2G);