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
//It is a left side wall follower. | |
#include <AFMotor.h> | |
#include <SR04.h> | |
AF_DCMotor motor3(3, MOTOR34_64KHZ); // Define motor #3, 64KHz pwm | |
AF_DCMotor motor4(4, MOTOR34_64KHZ); // Define motor #4, 64KHz pwm | |
int WF_LEFT_US_SENSOR_TRIG = 18; | |
int WF_LEFT_US_SENSOR_ECHO = 17; |
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
byte seven_seg_digits[10] = { B11111100, // = 0 | |
B01100000, // = 1 | |
B11011010, // = 2 | |
B11110010, // = 3 | |
B01100110, // = 4 | |
B10110110, // = 5 | |
B10111110, // = 6 | |
B11100000, // = 7 | |
B11111110, // = 8 | |
B11100110 // = 9 |
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 "pitches.h" | |
//------------------------------------------ | |
int adc_id = 6; | |
int buzzer = 13;//the pin of the passive buzzer | |
int melody[] = {NOTE_B0, NOTE_DS8}; | |
int duration = 1500; // 1500 miliseconds | |
//------------------------------------------ |
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 <SimpleDHT.h> | |
#include <LiquidCrystal.h> | |
#include "pitches.h" | |
// for DHT11, | |
// VCC: 5V or 3V | |
// GND: GND | |
// DATA: 2 | |
int pinDHT11 = 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
#include <AFMotor.h> | |
AF_DCMotor motor3(3, MOTOR34_64KHZ); // Define motor #3, 64KHz pwm | |
AF_DCMotor motor4(4, MOTOR34_64KHZ); // Define motor #4, 64KHz pwm | |
// Arduino pin numbers | |
const int X_pin = 0; // analog pin connected to X output | |
const int Y_pin = 1; // analog pin connected to Y output | |
const int SW_pin = 2; // digital pin connected to switch output |
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
//www.elegoo.com | |
//2016.12.9 | |
#include "pitches.h" | |
#include <LiquidCrystal.h> | |
int ledPin = 6; // LED on Pin 6 of Arduino | |
int pirPin = 2; // Input for HC-S501 | |
int buzzer = 5;//the pin of the passive buzzer | |
int pirValue; // Place to store read PIR Value |
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
/www.elegoo.com | |
//2016.12.9 | |
#include "pitches.h" | |
#include <LiquidCrystal.h> | |
int ledPin = 6; // LED on Pin 6 of Arduino | |
int pirPin = 2; // Input for HC-S501 | |
int buzzer = 5;//the pin of the passive buzzer | |
int pirValue; // Place to store read PIR Value |
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
/* Sweep | |
by BARRAGAN <http://barraganstudio.com> | |
This example code is in the public domain. | |
modified 8 Nov 2013 | |
by Scott Fitzgerald | |
http://www.arduino.cc/en/Tutorial/Sweep | |
*/ | |