This file contains hidden or 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
/* | |
Copyright (C) 2011 J. Coliz <[email protected]> | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License | |
version 2 as published by the Free Software Foundation. | |
*/ | |
/** | |
* Example RF Radio Ping Pair |
This file contains hidden or 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 <NewPing.h> | |
#define TRIGGER_PIN 12 // Arduino pin tied to trigger pin on the ultrasonic sensor. | |
#define ECHO_PIN 11 // 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. | |
void setup() { | |
Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results. |
This file contains hidden or 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 <Wire.h> | |
#include "RTClib.h" | |
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
RTC_DS1307 RTC; | |
void setup () { | |
Serial.begin(9600); | |
Wire.begin(); | |
RTC.begin(); |
This file contains hidden or 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 pin = 8; | |
void setup(){ | |
Serial.begin(9600); | |
pinMode(pin,OUTPUT); | |
digitalWrite(pin,LOW); | |
} | |
void loop() | |
{ |
This file contains hidden or 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 led1 = 5; | |
int led2 = 6; | |
int led3 = 7; | |
int led4 = 8; | |
int led5= 9; | |
int led6= 10; | |
int led7 = 11; | |
int BUTTON = 12; | |
void setup() { |
NewerOlder