Skip to content

Instantly share code, notes, and snippets.

@ronnietucker
ronnietucker / Brewduino
Last active Dec 27, 2015
Brewduino will monitor a fermentation vessel for temperature, and for controlling a heat mat.
View Brewduino
// 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;
@ronnietucker
ronnietucker / Auto Chicken Feeder
Last active Dec 11, 2018
Automatic Chicken Feeder
View Auto Chicken Feeder
/*
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)
@ronnietucker
ronnietucker / UltrasonicTFT
Created May 6, 2015
Ultrasonic + TFT screen
View UltrasonicTFT
#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
@ronnietucker
ronnietucker / 2WD Robot
Last active Aug 29, 2015
2WD Dagu Magician Robot
View 2WD Robot
// 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>
@ronnietucker
ronnietucker / Soil Moisture Detection
Last active Aug 29, 2015
Soil Moisture Detection
View Soil Moisture Detection
/*
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)
View RFID Reader
// 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
@ronnietucker
ronnietucker / Moisture Detection
Last active May 13, 2018
Moisture Detection With Two Nails
View Moisture Detection
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
@ronnietucker
ronnietucker / Ultrasonic & Servo
Last active Aug 29, 2015
Controlling a servo (with ultrasonic sensor) via joystick
View Ultrasonic & Servo
#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