Skip to content

Instantly share code, notes, and snippets.

View EdITSWORLD's full-sized avatar

EdITS WORLD EdITSWORLD

View GitHub Profile
#include<regx51.h>
void delay(int a) //function for delay generation
{
int i;
for(i=1;i<a;i++);
}
void main()
{
P1=0xff;
while(1) //logic to run program infinite times
@EdITSWORLD
EdITSWORLD / Interfacing of seven segment with 8051.c
Last active August 29, 2015 14:04
Interfacing of Seven Segment with 8051 microcontroller
#include<reg51.h>
void delay(int a) //function for delay generation
{
int i;
for(i=1;i<a;i++);
}
void main()
{
while(1) //logic to run program infinite times
{
@EdITSWORLD
EdITSWORLD / AVR - LED Interfacing Practice Program - Program 1.c
Last active March 21, 2017 08:36
AVR - LED Interfacing Practice Program
#include <avr/io.h>
int main(void)
{
DDRB=0xff;
unsigned char i;
//while(1)
{
for (i=1;i<=255;i++)
{
PORTB=i;
@EdITSWORLD
EdITSWORLD / AVR- LED Interfacing Practice Program 7.c
Last active May 28, 2017 19:34
AVR-LED Interfacing Practice Program 7 - Digital Sensor
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRD=DDRD & 0b1111110; //as an input port
DDRB=DDRB|0b00000001; //as an output port
while(1)
{
if (PIND&0b00000001)
PORTB=PORTB|0b0000001;
@EdITSWORLD
EdITSWORLD / Arduino - IoT Based Patient Health Monitoring System using ESP8266 & Arduino.c
Created December 26, 2018 17:55
Arduino - IoT Based Patient Health Monitoring System using ESP8266 & Arduino.c
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#include <SoftwareSerial.h>
float pulse = 0;
float temp = 0;
SoftwareSerial ser(9,10);
String apiKey = "OO707TGA1BLUNN12";
// Variables
int pulsePin = A0; // Pulse Sensor purple wire connected to analog pin 0
int blinkPin = 7 ; // pin to blink led at each beat
@EdITSWORLD
EdITSWORLD / IoT - Voice Based Home Automation with NodeMCU & Alexa using fauxmoESP.C
Last active February 13, 2019 16:24
Iot - Voice Based Home Automation with NodeMCU & Alexa using fauxmoESP
#include <Arduino.h>
#ifdef ESP32
#include <WiFi.h>
#else
#include <ESP8266WiFi.h>
#endif
#include "fauxmoESP.h"
#define WIFI_SSID "..your wifi name.."
#define WIFI_PASS "..your wifi password.."
@EdITSWORLD
EdITSWORLD / Arduino - Measurement of fan speed with IR and Arduino sensors.c
Created February 14, 2019 11:35
Measurement of fan speed with IR and Arduino sensors
#include<LiquidCrystal.h>
LiquidCrystal lcd(12,11,10,9,8,7);
float value=0;
float rev=0;
int rpm;
int oldtime=0;
int time;
void isr() //interrupt service routine
{
@EdITSWORLD
EdITSWORLD / IIoT - Seven color generation from RGB LED in efficient way in Arduino.c
Created November 4, 2019 11:28
IIoT - Seven color generation from RGB LED in efficient way in Arduino.c
//connect the RGB LED to pin 13, 12 ,11 respectively
void setup()
{
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
}
void loop()
@EdITSWORLD
EdITSWORLD / IoT - Smart Dustbin System.c
Last active November 5, 2019 11:47
IoT - Smart Dustbin System.c
#include <Servo.h>
int green = 13;
int blue = 12;
int buzzer = 10;
int trigg =11;
int echo = 8;
long tim ;
int cm, inch, a=0;
Servo pwm_pin;
void setup()
@EdITSWORLD
EdITSWORLD / IIoT - Ultrasonic Sensor Interfacing for distance calculation.c
Last active December 6, 2019 09:53
IIoT - Ultrasonic Sensor Interfacing for distance calculation
int cm=0;
int inches=0;
void setup() {
pinMode(7,OUTPUT);// put your setup code here, to run once:
pinMode(8,INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(7,0);