Skip to content

Commit

Permalink
Removed learning from travis, minor example sync
Browse files Browse the repository at this point in the history
  • Loading branch information
SRGDamia1 committed Feb 12, 2019
1 parent 65f2ef0 commit 5c9c2c6
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 24 deletions.
9 changes: 0 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.h> // Arduino IDE automatically includes Arduino.h, but other IDEs require that you include it.
#include <Wire.h> // This library is included with the Arduino IDE, and allows communication with I2C/TWI devices.
#include <DHT.h>
#include <Wire.h> // This library is included with the Arduino IDE, and allows communication with I2C/TWI devices.
#include <DHT.h> // 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.

Expand All @@ -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()
Expand Down Expand Up @@ -55,6 +59,5 @@ void loop()
Serial.print("Temperature: ");
Serial.print(t);
Serial.println(" *C");
delay(1000);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void setup ()
{
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);

Serial.begin(57600);
Wire.begin();
rtc.begin();
Expand All @@ -46,6 +47,7 @@ void loop ()
State8 = LOW;
}
digitalWrite(8, State8);

State9 = !State8;
digitalWrite(9, State9);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**************************************************************************
initial_demo_blink_temperature.ino
* Written By: Shannon Hicks <shicks@stroudcenter.org>
* Documentation By: Anthony Aufdenkampe <aaufdenkampe@limno.com>
Expand Down Expand Up @@ -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);

Expand Down
26 changes: 18 additions & 8 deletions workshop/mayfly_06_humidity-temp/mayfly_06_humidity-temp.ino
Original file line number Diff line number Diff line change
@@ -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 <Arduino.h>
#include <Wire.h>
#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.h> // Arduino IDE automatically includes Arduino.h, but other IDEs require that you include it.
#include <Wire.h> // This library is included with the Arduino IDE, and allows communication with I2C/TWI devices.
#include <DHT.h> // 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)
Expand All @@ -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");
Expand Down

0 comments on commit 5c9c2c6

Please sign in to comment.