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
| //EDISON SCIENCE CORNER | |
| //EDISON SCIENCE CORNER | |
| //EDISON SCIENCE CORNER | |
| int analogPin = A0; | |
| int val = 0; | |
| void setup() { | |
| Serial.begin(9600); | |
| for (int i = 2; i <=13; i++) { |
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 <Servo.h> | |
| Servo ESC; // create servo object to control the ESC | |
| int potValue; // value from the analog pin | |
| void setup() { | |
| // Attach the ESC on pin 9 | |
| ESC.attach(9,1000,2000); // (pin, min pulse width, max pulse width in microseconds) | |
| } | |
| void loop() { | |
| potValue = analogRead(A0); // reads the value of the potentiometer (value between 0 and 1023) |
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
| //www.edisonsciencecorner.blogspot.com | |
| //https://www.youtube.com/channel/UCESZHuYTzx0Eyd3yJ8u60Fg | |
| #define BLYNK_PRINT Serial | |
| #include <ESP8266WiFi.h> | |
| #include <BlynkSimpleEsp8266.h> | |
| char auth[] = "M1zi9KAx0C-G7uWRDagqRSyqvjzghd50"; // blynk token |
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
| // www.edisonsciencecorner.blogspot.com | |
| // https://www.youtube.com/channel/UCESZHuYTzx0Eyd3yJ8u60Fg | |
| #include <ESP8266WiFi.h> | |
| char ssid[] = "edison science corner"; // ssid | |
| char pass[] = "eeeeeeee"; // password | |
| int readD1; | |
| int readD2; | |
| int Pin_D1 = 4; | |
| int Pin_D2 = 5; |
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
| // www.edisonsciencecorner.blogspot.com | |
| // https://www.youtube.com/channel/UCESZHuYTzx0Eyd3yJ8u60Fg | |
| #include <Servo.h> | |
| Servo myservo; // create servo object to control a servo | |
| int potpin = 0; // analog pin used to connect the potentiometer | |
| int val; // variable to read the value from the analog pin |
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
| //www.edisonsciencecorner.blogspot.con | |
| #include "pitches.h" | |
| #define speaker 8 | |
| int melody[] = { | |
| NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, | |
| NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, | |
| NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, | |
| NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, | |
| NOTE_AS4, NOTE_AS4, NOTE_AS4, NOTE_AS4, | |
| NOTE_D5, NOTE_D5, NOTE_D5, NOTE_D5, |
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
| //www.edisonsciencecorner.blogspot.com | |
| //https://www.youtube.com/channel/UCESZHuYTzx0Eyd3yJ8u60Fg | |
| #define BLYNK_PRINT Serial | |
| #include <ESP8266WiFi.h> |
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
| // Defines pins numbers | |
| const int stepPin = 3; | |
| const int dirPin = 4; | |
| int customDelay,customDelayMapped; // Defines variables | |
| void setup() { | |
| // Sets the two pins as Outputs | |
| pinMode(stepPin,OUTPUT); | |
| pinMode(dirPin,OUTPUT); |
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
| //www.edisonsciencecorner.blogspot.com | |
| //www.edisonsciencecorner.blogspot.com | |
| //www.edisonsciencecorner.blogspot.com | |
| //www.edisonsciencecorner.blogspot.com | |
| #include <LedControl.h> | |
| int lm35_pin = A0; | |
| int DIN = 8; | |
| int CS = 9; | |
| int CLK = 10; |
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
| const int trigPin = 9; | |
| const int echoPin = 10; | |
| long duration; | |
| int distance; | |
| void setup() { | |
| pinMode(trigPin, OUTPUT); // trigPin as Output | |
| pinMode(echoPin, INPUT); // echoPin as Input | |
| Serial.begin(9600); // serial communication | |
| } |