Product Overview
1/29/2018 ESP32 Thing Motion Shield Hookup Guide - learn.sparkfun.com
https://learn.sparkfun.com/tutorials/esp32-thing-motion-shield-hookup-guide?_ga=2.240586115.1022152466.1517244327-204410570.1509632255 14/17
SDO 19
SCK
18
3.3V 3.3V
GND GND
To start the BME280 in SPI mode, switch the configuration by commenting/uncommenting code. Otherwise, the code
is the same.
Using the GPS Port
The GPS port is just a pass-through to the serial port, so configuration is easy. Simply start the serial port at the
desired baud, usually 9600.
This example simply passes serial monitor data to the GPS port, and GPS data to the serial monitor. Set the serial
speeds when calling begin. Serial is the USB serial port, and Serial1 is the GPS port.
COPY CODE
/******************************************************************************
BME280_I2C_SPI.ino
BME280 on the ESP32 Thing
Marshall Taylor @ SparkFun Electronics
Original creation date: May 20, 2015
Modified: Nov 6, 2017
https://github.com/sparkfun/ESP32_Motion_Shield
This sketch configures a BME280 to produce comma separated values for use
in generating spreadsheet graphs.
It has been modified from the original BME280 example to demonstrate I2C and
SPI operation on the ESP32 Motion board.
Original source:
https://github.com/sparkfun/SparkFun_BME280_Arduino_Library
COPY CODE
#include <Arduino.h>
HardwareSerial Serial1(2); // UART1/Serial1 pins 16,17
void setup()
{
Serial.begin(115200);
Serial1.begin(9600);
delay(1000);
Serial.println("Weeee!");
}
void loop() {