Skip to content

Instantly share code, notes, and snippets.

/*
* Use the I2C bus with EEPROM 24LC64
* Sketch: eeprom.pde
*
* Author: hkhijhe
* Date: 01/10/2010
*
*
*/
#include "LowPower.h" //https://github.com/rocketscream/Low-Power
#include <Wire.h>
#include <SPI.h>
#include <DS3232RTC.h> //http://github.com/JChristensen/DS3232RTC
#include <Streaming.h> //http://arduiniana.org/libraries/streaming/
#include<stdlib.h>
#include <SD.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085_U.h>
#include <Time.h>
#include <Wire.h>
#include <Adafruit_ADS1015.h> // https://github.com/adafruit/Adafruit_ADS1X15
// Adafruit_ADS1115 ads; /* Use this for the 16-bit version */
Adafruit_ADS1015 ads; /* Use thi for the 12-bit version */
void setup(void)
{
Serial.begin(9600);
Serial.println("Hello!");
#include <Wire.h>
#include <Adafruit_ADS1015.h> // https://github.com/adafruit/Adafruit_ADS1X15
Adafruit_ADS1115 ads; /* Use this for the 16-bit version */
//Adafruit_ADS1015 ads; /* Use thi for the 12-bit version */
void setup(void)
{
Serial.begin(9600);
Serial.println("Hello!");
#include <Wire.h>
#include <Adafruit_ADS1015.h> // https://github.com/adafruit/Adafruit_ADS1X15
#include <OneWire.h> //http://www.pjrc.com/teensy/td_libs_OneWire.html
#include <DallasTemperature.h> //https://github.com/milesburton/Arduino-Temperature-Control-Library
Adafruit_ADS1115 ads; /* Use this for the 16-bit version */
//Adafruit_ADS1015 ads; /* Use thi for the 12-bit version */
//1-wire sensor
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 6
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
#include "LowPower.h" //https://github.com/rocketscream/Low-Power
#include <Wire.h>
#include <SPI.h>
#include <DS3232RTC.h> //http://github.com/JChristensen/DS3232RTC
#include <Streaming.h> //http://arduiniana.org/libraries/streaming/
#include<stdlib.h>
#include <SD.h>
#include <Time.h>
//sleeping stuff
@dwblair
dwblair / interrupt_measure.ino
Last active March 13, 2016 06:21
turning a pin on and off at a given frequency, and measuring the current while it's on
#include <TimerOne.h>
// This example uses the timer interrupt to blink an LED
// and also demonstrates how to share a variable between
// the interrupt and the main program.
float vcc = 5; // volts
float vground = 2.51; // volts -- the virtual ground value
const int led = 3; // the pin with a LED
float r1 = 3190; // the current-voltage resistance --> amplification
// This is a basic snapshot sketch using the VC0706 library.
// On start, the Arduino will find the camera and SD card and
// then snap a photo, saving it to the SD card.
// Public domain.
// If using an Arduino Mega (1280, 2560 or ADK) in conjunction
// with an SD card shield designed for conventional Arduinos
// (Uno, etc.), it's necessary to edit the library file:
// libraries/SD/utility/Sd2Card.h
// Look for this line: