This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <UTFT.h> | |
#include <NewPing.h> | |
#include <Servo.h> | |
#define TRIGGER_PIN 5 // Arduino pin tied to trigger pin on the ultrasonic sensor. | |
#define ECHO_PIN 3 // Arduino pin tied to echo pin on the ultrasonic sensor. | |
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. | |
Servo myservo; // create servo L/R object | |
Servo myservo2; // create servo U/D object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
CREDITS: | |
DS3231 library: https://github.com/rodan/ds3231 | |
RTC+LCD code: https://www.youtube.com/watch?v=NDwSrgfsiYQ | |
DHT11 code: http://playground.arduino.cc/main/DHT11Lib | |
WiFi to Thingspeak: http://www.instructables.com/id/ESP8266-Wifi-Temperature-Logger/step3/Arduino-Setup-and-Sketch/ | |
*/ | |
//Celsius to Fahrenheit conversion | |
double Fahrenheit(double celsius) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bluetooth module is an HC-06 | |
// default pw = 1234 | |
// Vcc=5v, Gnd=0, Rx > Tx1, Tx > Rx1 | |
// Flashing red LED on BT module = not connected | |
// Using ArduinoRC for control. | |
// AduinoRC is currently set for WSAD to control Fwd, Bk, L and R | |
#include <AFMotor.h> | |
#include <NewPing.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <UTFT.h> | |
#include <NewPing.h> | |
#define TRIGGER_PIN 5 // Arduino pin tied to trigger pin on the ultrasonic sensor. | |
#define ECHO_PIN 3 // Arduino pin tied to echo pin on the ultrasonic sensor. | |
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. | |
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. | |
//for QD_TFT180X SPI LCD Modle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LCD i2c (Four Pin LCD sreen) | |
// use pins 20 and 21 on MEGA | |
#include <Wire.h> | |
#include <LCD.h> | |
#include <LiquidCrystal_I2C.h> | |
// get new LCD library from: https://bitbucket.org/fmalpartida/new-liquidcrystal | |
// DHT22 | |
#include <dht.h> | |
dht DHT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// code from: | |
// http://www.grantgibson.co.uk/2012/04/how-to-get-started-with-the-mifare-mf522-an-and-arduino/ | |
// 3.3v > 3.3v | |
// RST > Pin 5 | |
// GND > Ground | |
// IRQ > not used | |
// MISO > Pin 12 | |
// MOSI > Pin 11 | |
// SCK > Pin 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int moistureSensor = 0; // nail to read from is pin A0 | |
int moisture_val; | |
const int redLEDPin = 3; // red LED connected to digital pin | |
const int yellowLEDPin = 4; // yellow LED connected to digital pin | |
const int greenLEDPin = 5; // green LED connected to digital pin | |
const int blueLEDPin = 7; // blue LED connected to digital pin | |
const int buttonPin = 9; // button connected to digital pin | |
const int voltage = 8; // the voltage nail is on pin D8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
CREDITS: | |
DS3231 library: https://github.com/rodan/ds3231 - see examples for alarm stuff | |
RTC+LCD code: https://www.youtube.com/watch?v=NDwSrgfsiYQ | |
DHT11 code: http://playground.arduino.cc/main/DHT11Lib | |
WiFi to Thingspeak: http://www.instructables.com/id/ESP8266-Wifi-Temperature-Logger/step3/Arduino-Setup-and-Sketch/ | |
*/ | |
//Celsius to Fahrenheit conversion | |
double Fahrenheit(double celsius) |