introduction_to_the_internet_of_things
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
introduction_to_the_internet_of_things [2018/07/30 18:02] – sdh7 | introduction_to_the_internet_of_things [2018/08/01 03:32] – sdh7 | ||
---|---|---|---|
Line 7: | Line 7: | ||
Install Arduino IDE if you don't already have it, and upgrade to something recent if you're below version 1.7 - http:// | Install Arduino IDE if you don't already have it, and upgrade to something recent if you're below version 1.7 - http:// | ||
* In Boards Manager, add ESP8266 Board support | * In Boards Manager, add ESP8266 Board support | ||
+ | * FIXME: This is missing steps | ||
Set up a Cayenne account - https:// | Set up a Cayenne account - https:// | ||
+ | * FIXME: document getting MQTT connect info | ||
Install the following libraries: | Install the following libraries: | ||
* Cayenne MQTT Library - https:// | * Cayenne MQTT Library - https:// | ||
- | * Adafruit Sensor Library | + | * Adafruit Sensor Library |
- | * Adafruit BME280 library | + | * Adafruit BME280 library |
* Arduino SimpleTimer library https:// | * Arduino SimpleTimer library https:// | ||
Line 19: | Line 21: | ||
* on OS X, navigate using the finder or otherwise cd ~/ | * on OS X, navigate using the finder or otherwise cd ~/ | ||
* On Windows & Linux the files will be somewhere similar. | * On Windows & Linux the files will be somewhere similar. | ||
- | * edit Adafruit_BME280.h using your favorite editor- change #define BME280_ADDRESS from 0x77 to 0x76 | + | * edit Adafruit_BME280.h using your favorite editor, and change #define BME280_ADDRESS from 0x77 to 0x76 |
- | * more advanced C programmers may do something like: | + | |
- | < | + | |
- | #define BME280_ADDRESS 0x77 | + | |
- | #ifdef CLASS_BME280 | + | |
- | #define BME280_ADDRESS 0x76 | + | |
- | #endif | + | |
- | </ | + | |
- | + | ||
- | and then add #define CLASS_BME280 at the beginning of your program, so that way if you get an Adafruit BME280 board in the future, it will continue to work right... | + | |
===If Using Your Phone to Tether=== | ===If Using Your Phone to Tether=== | ||
Line 46: | Line 39: | ||
* If you plan on re-using the boards for something else in the future, solder in header pins on the other boards. If you're building this as a fixed-in-place design, you'll want to just solder wires to the boards. Theoretically, | * If you plan on re-using the boards for something else in the future, solder in header pins on the other boards. If you're building this as a fixed-in-place design, you'll want to just solder wires to the boards. Theoretically, | ||
* wiring: | * wiring: | ||
- | * ESP8266-> | + | * ESP8266-> |
- | * AMS1117-> | + | * AMS1117-> |
- | + | * Note that the 3.3V & GND connections are going to multiple places. | |
+ | ==Software Programming== | ||
+ | This is the stock program for the class, with some minor edits to account for our BME280 header hack above. | ||
- | |||
- | ==Software Programming== | ||
< | < | ||
#define CAYENNE_PRINT Serial | #define CAYENNE_PRINT Serial | ||
- | #define CLASS_BME280 1 //enable BME280 board hack | ||
#include < | #include < |
introduction_to_the_internet_of_things.txt · Last modified: 2018/08/22 15:09 by sdh7