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
const int sensorDOPin = 2; // connect DO pin to pin 2 of Arduino | |
const int ledPin = 13; // the number of the LED pin | |
// variables will change: | |
int SensorState = 0; // variable for the state of the sensor | |
void setup() { | |
// initialize the LED pin as an output: | |
pinMode(ledPin, OUTPUT); | |
// initialize the sensor pin DO as input |
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 the library code: | |
#include <LiquidCrystal.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd(13, 12, 10, 9, 8, 7); | |
void setup(){ | |
// set up the LCD's number of columns and rows: | |
lcd.begin(16, 2); |
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
/* | |
Example: Control a WTV020-SD-16P evaluation board to play voices using WTV020SD-16P | |
module. | |
www.buildcircuit.com | |
Released into the public domain. | |
*/ | |
#include <Wtv020sd16p.h> | |
int resetPin = 2; // The pin number of the reset pin. |
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
//Arduino 1.0+ Only | |
//Arduino 1.0+ Only | |
#include "Wire.h" | |
#define DS1307_ADDRESS 0x68 | |
void setup(){ | |
Wire.begin(); | |
Serial.begin(9600); | |
} |
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
// Date and time functions using a DS1307 RTC connected via I2C and Wire lib | |
#include <Wire.h> | |
#include "RTClib.h" | |
RTC_DS1307 RTC; | |
void setup () { | |
Serial.begin(57600); | |
Wire.begin(); |
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
/* Shift Out Data | |
Decimal to Binary using Android Emulator | |
* | |
works with Arduino 1.0 and above | |
*/ | |
int ledPin=11; | |
int data = 8;//Connect Pin 8 of Arduino to pin 2 of CD4094 or HEF4794 | |
int strob = 7;//Connect Pin 12 to Pin 1 of CD4094 | |
int clock = 10;//Connect pin 10 of Arduino to pin 3 of CD4094 |
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
/* Shift Out Data | |
* -------------- | |
* | |
* Shows a byte, stored in "dato" on a set of 8 LEDs | |
* | |
* (copyleft) 2005 K3, Malmo University | |
* @author: David Cuartielles, Marcus Hannerstig | |
* @hardware: David Cuartielles, Marcos Yarza | |
* @project: made for SMEE - Experiential Vehicles | |
*/ |
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 mq3_analogPin = A0; // connected to the output pin of MQ3 | |
void setup(){ | |
Serial.begin(9600); // open serial at 9600 bps | |
} | |
void loop() | |
{ | |
// give ample warmup time for readings to stabilize |
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 <LiquidCrystal.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); | |
void setup() | |
{ | |
// set up the LCD's number of rows and columns: | |
lcd.begin(16, 2); | |
// Print a message to the LCD. | |
lcd.print("Hello, world!"); | |
} |
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
/* | |
Sends sensor data to Android | |
(needs SensorGraph and Amarino app installed and running on Android) | |
*/ | |
#include <MeetAndroid.h> | |
MeetAndroid meetAndroid; | |
int sensor = A1; | |
int redLed = 11; |
OlderNewer