From 5c9c2c60e25cfc9ffd852dad8eb9d40562b571c2 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Tue, 12 Feb 2019 12:58:32 -0500 Subject: [PATCH] Removed learning from travis, minor example sync --- .travis.yml | 9 ------- .../digital_humidity_temperature.ino | 11 +++++--- .../initial_demo_blink_temperature.ino | 2 ++ .../mayfly_05_blink_temperature.ino | 6 ++--- .../mayfly_06_humidity-temp.ino | 26 +++++++++++++------ 5 files changed, 30 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4918759..c090eeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,15 +51,6 @@ env: - PLATFORMIO_CI_SRC=workshop/mayfly_10_sonar/mayfly_10_sonar.ino - PLATFORMIO_CI_SRC=workshop/mayfly_10b_DHT_LED/mayfly_10b_DHT_LED.ino - PLATFORMIO_CI_SRC=workshop/mayfly_10c_TempDS18B20_LED/mayfly_10c_TempDS18B20_LED.ino - - - PLATFORMIO_CI_SRC=learning/Blink_Example1_Mayfly/Blink_Example1_Mayfly.ino - - PLATFORMIO_CI_SRC=learning/Blink_Example2_Mayfly/Blink_Example2_Mayfly.ino - - PLATFORMIO_CI_SRC=learning/Example_03_Button_Mayfly/Example_03_Button_Mayfly.ino - - PLATFORMIO_CI_SRC=learning/Example_04a_Luminosity_Mayfly/Example_04a_Luminosity_Mayfly.ino - - PLATFORMIO_CI_SRC=learning/Example_04b_LuminOLED_Mayfly/Example_04b_LuminOLED_Mayfly.ino - - PLATFORMIO_CI_SRC=learning/Example_05_humidity-temp_Mayfly/Example_05_humidity-temp_Mayfly.ino - - PLATFORMIO_CI_SRC=learning/Example_05b_humidity-temp_Mayfly/Example_05b_humidity-temp_Mayfly.ino - - PLATFORMIO_CI_SRC=learning/Example_07_LumHumTem_Mayfly/Example_07_LumHumTem_Mayfly.ino # install: - pip install -U platformio diff --git a/examples/digital_humidity_temperature/digital_humidity_temperature.ino b/examples/digital_humidity_temperature/digital_humidity_temperature.ino index 81dd8e4..b3fa4a3 100644 --- a/examples/digital_humidity_temperature/digital_humidity_temperature.ino +++ b/examples/digital_humidity_temperature/digital_humidity_temperature.ino @@ -8,12 +8,11 @@ After upload open the serial monitor (magnifying lens button) to view data. modified 7 Jun 2017 by Beth Fisher github.com/fisherba **************************************************************************************/ - //Arduino sketches begin with a list of the outside libraries needed to run the sketch. //They must be in your .../Arduino/libraries directory for the sketch to run. #include // Arduino IDE automatically includes Arduino.h, but other IDEs require that you include it. -#include // This library is included with the Arduino IDE, and allows communication with I2C/TWI devices. -#include +#include // This library is included with the Arduino IDE, and allows communication with I2C/TWI devices. +#include // Includes the Adafruit DHT-sensor-library 1.3.0+, which was updated to require the Unified Adafruit_Sensor sensor #define DHTPIN 10 // Specifies the pin connected to the DHT signal. @@ -22,6 +21,11 @@ modified 7 Jun 2017 by Beth Fisher github.com/fisherba //#define DHTTYPE DHT22 // DHT 22 (AM2302) //#define DHTTYPE DHT21 // DHT 21 (AM2301) +// Connect pin 1 (on the left) of the sensor to +5V +// Connect pin 2 of the sensor to whatever your DHTPIN is +// Connect pin 4 (on the right) of the sensor to GROUND +// Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor + DHT dht(DHTPIN, DHTTYPE); void setup() @@ -55,6 +59,5 @@ void loop() Serial.print("Temperature: "); Serial.print(t); Serial.println(" *C"); - delay(1000); } } diff --git a/examples/initial_demo_blink_temperature/initial_demo_blink_temperature.ino b/examples/initial_demo_blink_temperature/initial_demo_blink_temperature.ino index e49b39c..03623e9 100644 --- a/examples/initial_demo_blink_temperature/initial_demo_blink_temperature.ino +++ b/examples/initial_demo_blink_temperature/initial_demo_blink_temperature.ino @@ -31,6 +31,7 @@ void setup () { pinMode(8, OUTPUT); pinMode(9, OUTPUT); + Serial.begin(57600); Wire.begin(); rtc.begin(); @@ -46,6 +47,7 @@ void loop () State8 = LOW; } digitalWrite(8, State8); + State9 = !State8; digitalWrite(9, State9); diff --git a/workshop/mayfly_05_blink_temperature/mayfly_05_blink_temperature.ino b/workshop/mayfly_05_blink_temperature/mayfly_05_blink_temperature.ino index 5a9cd9a..03623e9 100644 --- a/workshop/mayfly_05_blink_temperature/mayfly_05_blink_temperature.ino +++ b/workshop/mayfly_05_blink_temperature/mayfly_05_blink_temperature.ino @@ -1,4 +1,5 @@ /************************************************************************** +initial_demo_blink_temperature.ino * Written By: Shannon Hicks * Documentation By: Anthony Aufdenkampe @@ -36,15 +37,14 @@ void setup () rtc.begin(); Serial.println("EnviroDIY Mayfly: Blink demo with serial temperature"); - } void loop () { if (State8 == LOW) { - State8 = HIGH; + State8 = HIGH; } else { - State8 = LOW; + State8 = LOW; } digitalWrite(8, State8); diff --git a/workshop/mayfly_06_humidity-temp/mayfly_06_humidity-temp.ino b/workshop/mayfly_06_humidity-temp/mayfly_06_humidity-temp.ino index 4af2e0f..b3fa4a3 100644 --- a/workshop/mayfly_06_humidity-temp/mayfly_06_humidity-temp.ino +++ b/workshop/mayfly_06_humidity-temp/mayfly_06_humidity-temp.ino @@ -1,12 +1,22 @@ -//Connect the Grove Digital Humidity and Temperature (DHT) board to D10-11 Grove connector on the Mayfly +/************************************************************************************** +Logs temperature and humidity at one second intervals to serial monitor. +Written for Mayfly logger and Grove digital temperature/humidity board (DHT11), with +options for DHT 21 and 22. +Connect the Grove Digital Temp/Humidity board to D10-11 Grove connector on the Mayfly. +After upload open the serial monitor (magnifying lens button) to view data. -#include -#include -#include "DHT.h" // Includes the Adafruit DHT-sensor-library 1.3.0+, which was updated to require the Unified Adafruit_Sensor sensor +modified 7 Jun 2017 by Beth Fisher github.com/fisherba +**************************************************************************************/ -#define DHTPIN 10 // what pin the DHT signal is connected to +//Arduino sketches begin with a list of the outside libraries needed to run the sketch. +//They must be in your .../Arduino/libraries directory for the sketch to run. +#include // Arduino IDE automatically includes Arduino.h, but other IDEs require that you include it. +#include // This library is included with the Arduino IDE, and allows communication with I2C/TWI devices. +#include // Includes the Adafruit DHT-sensor-library 1.3.0+, which was updated to require the Unified Adafruit_Sensor sensor -// Uncomment whatever type you're using! +#define DHTPIN 10 // Specifies the pin connected to the DHT signal. + +// Uncomment the digital temperature/humidity model you're using #define DHTTYPE DHT11 // DHT 11 //#define DHTTYPE DHT22 // DHT 22 (AM2302) //#define DHTTYPE DHT21 // DHT 21 (AM2301) @@ -20,8 +30,8 @@ DHT dht(DHTPIN, DHTTYPE); void setup() { - pinMode(22, OUTPUT); // Setting up Pin 22 to provide power to Grove Ports - digitalWrite(22, HIGH); // Provide power to D10-11 and D6-7 Grove Ports + pinMode(22, OUTPUT); //pin D22 is the enable line for the Mayfly's switched 3.3/5v power lines + digitalWrite(22, HIGH); //set this pin high and leave it on for the rest of the sketch delay(200); Serial.begin(57600); Serial.println("Digital Humidity/Temperature");