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 micPin = A0; // pin that the mic is attached to | |
int gndPin = A1; | |
int powerPin = A2; | |
int micValue1 = 0; | |
int micValue2 = 0; // the Microphone value | |
int led1 = 13; | |
boolean lightOn = false; | |
void setup() { |
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
#define NOTE_B0 31 | |
#define NOTE_C1 33 | |
#define NOTE_CS1 35 | |
#define NOTE_D1 37 | |
#define NOTE_DS1 39 | |
#define NOTE_E1 41 | |
#define NOTE_F1 44 | |
#define NOTE_FS1 46 | |
#define NOTE_G1 49 | |
#define NOTE_GS1 52 |
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 <Servo.h> | |
int val = 0 ; | |
Servo s1; | |
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(2,INPUT); | |
s1.attach(11); | |
} | |
void loop() |
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
//http://www.youtube.com/diyelectronic is Fun// | |
//http://www.instagram.com/diyelectronic is Fun// | |
//Project by Diy Electronic// | |
int pinsCount=10; // declaring the integer variable pinsCount | |
int pins[] = {2,3,4,5,6,7,8,9,10,11}; // declaring the array pins[] | |
void setup() { | |
for (int i=0; i<pinsCount; i=i+1){ // counting the variable i from 0 to 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 <Servo.h> | |
#define threshold 250 | |
#define unpress_angle 70 | |
#define press_angle 36 | |
Servo myservo; // create servo object to control a servo | |
bool trig=true; | |
void setup() { |