Skip to content

Instantly share code, notes, and snippets.

View EDISON-SCIENCE-CORNER's full-sized avatar
🏠
Working from home

RAJESH K T EDISON-SCIENCE-CORNER

🏠
Working from home
View GitHub Profile
//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++) {
#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)
//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
// 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;
// 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
//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,
//www.edisonsciencecorner.blogspot.com
//https://www.youtube.com/channel/UCESZHuYTzx0Eyd3yJ8u60Fg
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
// 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);
//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;
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
}