Skip to content

Commit d832f13

Browse files
author
panky-codes
committed
Added function definitions to all the example sketches
1 parent a958204 commit d832f13

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

examples/LSM9DS1_Basic_I2C/LSM9DS1_Basic_I2C.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ static unsigned long lastPrint = 0; // Keep track of print time
8484
// http://www.ngdc.noaa.gov/geomag-web/#declination
8585
#define DECLINATION -8.58 // Declination (degrees) in Boulder, CO.
8686

87+
//Function definitions
88+
void printGyro();
89+
void printAccel();
90+
void printMag();
91+
void printAttitude(float ax, float ay, float az, float mx, float my, float mz);
92+
8793
void setup()
8894
{
8995

examples/LSM9DS1_Basic_SPI/LSM9DS1_Basic_SPI.ino

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ LSM9DS1 imu;
8787
// http://www.ngdc.noaa.gov/geomag-web/#declination
8888
#define DECLINATION -8.58 // Declination (degrees) in Boulder, CO.
8989

90+
//Function definitions
91+
void printGyro();
92+
void printAccel();
93+
void printMag();
94+
void printAttitude(float ax, float ay, float az, float mx, float my, float mz);
95+
9096
void setup()
9197
{
9298
Serial.begin(115200);

examples/LSM9DS1_Interrupts/LSM9DS1_Interrupts.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ const int RDYM_PIN = 6; // RDY pin to D6
7979
// Variable to keep track of when we print sensor readings:
8080
unsigned long lastPrint = 0;
8181

82+
//Function Definitions
83+
void printStats();
84+
8285
// configureIMU sets up our LSM9DS1 interface, sensor scales
8386
// and sample rates.
8487
uint16_t configureIMU()

examples/LSM9DS1_Settings/LSM9DS1_Settings.ino

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ unsigned int tempReadCounter = 0;
6060
unsigned long lastPrint = 0;
6161
const unsigned int PRINT_RATE = 500;
6262

63+
//Function definitions
64+
void printSensorReadings();
65+
6366
void setupDevice()
6467
{
6568
// [commInterface] determines whether we'll use I2C or SPI

0 commit comments

Comments
 (0)