/*
* MicroMod Weather Carrier Board Example
*
* This sketch tests all of the weather sensors on the carrier board:
* atmospheric sensor - BME280, UV sensor - VEML6075, lightning detector - AS3935,
* soil moisture sensor, wind and rain meters.
*
* Priyanka Makin @ SparkX Labs
* Original Creation Date: August 20, 2020
*
* This code is Lemonadeware; if you see me (or any other SparkFun employee) at the
* local, and you've found our code helpful, please buy us a round!
*
* Hardware Connections:
* Insert MicroMod Processor Board of your choice into the M.2 connector of the SparkFun Weather
carrier
* Screw into place
* Connect Weather carrier board to power useing USB-C cable
* Connect SparkFun Soil Moisture Sensor to Weather carrier using latching terminals
* Connect both wind and rain meters to Weather carrier using the RJ11 connectors
*/
#include <Wire.h>
#include <SPI.h>
#include "SparkFunBME280.h"
#include <SparkFun_VEML6075_Arduino_Library.h>
#include "SparkFun_AS3935.h"
BME280 tempSensor;
VEML6075 uv;
SparkFun_AS3935 lightning;
#define INDOOR 0x12
#define OUTDOOR 0xE
#define LIGHTNING_INT 0x08
#define DISTURBER_INT 0x04
#define NOISE_INT 0x01
#if defined(ESP_PLATFORM)
int LED_BUILTIN = 5;
//int A0 = 34;
int G0 = 4;
int D0 = 23;
//int A1 = 35;
int D1 = 27;
const int G3 = 17;
int G1 = 12;
#elif defined(ARDUINO_ARCH_SAMD)
int G0 = 2;
int D0 = 0;
int D1 = 1;
//const int lightningInt = G3; //SPI does not currently work on the SAMD51 proto
//int spiCS = G1;