Skip to content

Instantly share code, notes, and snippets.

View ansarid's full-sized avatar

Daniyal Ansari ansarid

  • Texas A&M Engineering Experiment Station
  • College Station, Texas
View GitHub Profile
/*
* NunchuckPrint
*
* 2007 Tod E. Kurt, http://todbot.com/blog/
*
* Change log:
*
* Mark Tashiro - Changed Wire.read to Wire.write
* Changed Wire.receive to Wire.read
* Added code for servos
#include <Wire.h>
static uint8_t nunchuck_buf[6]; // array to store nunchuck data,
void setup(){
Serial.begin(115200);
nunchuck_setpowerpins(); // use analog pins 2&3 as fake gnd & pwr
nunchuck_init(); // send the initilization handshake
}
/***************************************************
This is an example for the TMP006 Barometric Pressure & Temp Sensor
Designed specifically to work with the Adafruit TMP006 Breakout
----> https://www.adafruit.com/products/1296
These displays use I2C to communicate, 2 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
@ansarid
ansarid / on_off_test.ino
Created November 3, 2017 08:13
ON/OFF Toggle Test
int ON_BUTTON = 13;
void setup() {
pinMode(ON_BUTTON, OUTPUT);
}
void loop() {
delay(5000);
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
// Enviromental Managment System
// Pins:
// LCD - 2,3,4,5,6,7
// DHT11/22 - 8
// Sprayer - 9
// Vent Servo - 10
// Fan - 11
// Buzzer - 12