This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <nRF24L01.h> | |
#include <RF24.h> | |
RF24 radio(8, 7); // CE, CSN | |
struct dataStruct{ | |
double latitude; | |
double longitude; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <TinyGPS++.h> | |
#include <SoftwareSerial.h> | |
TinyGPSPlus gps; | |
SoftwareSerial ss(4, 3); | |
struct dataStruct{ | |
double latitude; | |
double longitude; | |
unsigned long date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <onewire.h> | |
#include <dallastemperature.h> | |
OneWire oneWire(6); | |
DallasTemperature sensors(&oneWire); | |
float water_temperature; | |
void setup() { | |
Serial.begin(115200); | |
sensors.begin(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Wave power formula: P = 0.5 height ** 2 * period // https://en.wikipedia.org/wiki/Wave_power | |
#include "Wire.h" | |
#include "I2Cdev.h" // Get these libraries from https://github.com/jrowberg/i2cdevlib/tree/master/Arduino | |
#include "MPU6050.h" // ^ | |
#include <MS5611.h> // Get this library from https://github.com/jarzebski/Arduino-MS5611 | |
MPU6050 mpu; | |
MS5611 baro; | |
long pressure; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Wire.h" | |
#include "I2Cdev.h" // Get these libraries from https://github.com/jrowberg/i2cdevlib/tree/master/Arduino | |
#include "MPU6050.h" // ^ | |
#include <MS5611.h> // Get this library from https://github.com/jarzebski/Arduino-MS5611 | |
MPU6050 mpu; | |
MS5611 baro; | |
long pressure; | |
double altitude, min_height, max_height, mid_point, smudge_factor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Wire.h" | |
#include "I2Cdev.h" // Get these libraries from https://github.com/jrowberg/i2cdevlib/tree/master/Arduino | |
#include "MPU6050.h" // ^ | |
#include <MS5611.h> // Get this library from https://github.com/jarzebski/Arduino-MS5611 | |
MPU6050 mpu; | |
MS5611 baro; | |
long pressure; | |
double altitude, min_height, max_height, wave_height; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Wire.h" | |
#include "I2Cdev.h" // Get these libraries from https://github.com/jrowberg/i2cdevlib/tree/master/Arduino | |
#include "MPU6050.h" // ^ | |
#include <MS5611.h> // Get this library from https://github.com/jarzebski/Arduino-MS5611 | |
MPU6050 mpu; | |
MS5611 baro; | |
double temp; | |
long pressure; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Wire.h" | |
#include "I2Cdev.h" // Get these libraries from https://github.com/jrowberg/i2cdevlib/tree/master/Arduino | |
#include "MPU6050.h" // ^ | |
#include "HMC5883L.h" // ^ | |
MPU6050 mpu; | |
HMC5883L mag; | |
int16_t mx, my, mz; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Wire.h" | |
#include "I2Cdev.h" // Get these libraries from https://github.com/jrowberg/i2cdevlib/tree/master/Arduino | |
#include "MPU6050.h" // ^ | |
MPU6050 mpu; | |
int16_t ax, ay, az; | |
int16_t gx, gy, gz; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "I2Cdev.h" | |
#include "MPU6050_6Axis_MotionApps20.h" | |
#include "HMC5883L.h" | |
#include "Wire.h" | |
MPU6050 mpu; | |
HMC5883L mag; | |
int16_t mx, my, mz; | |
#define INTERRUPT_PIN 2 // use pin 2 on Arduino Uno & most boards |