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<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 |
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<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 | |
| { |
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 <avr/io.h> | |
| int main(void) | |
| { | |
| DDRB=0xff; | |
| unsigned char i; | |
| //while(1) | |
| { | |
| for (i=1;i<=255;i++) | |
| { | |
| PORTB=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 <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; |
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 <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 |
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 <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.." |
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<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 | |
| { |
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
| //connect the RGB LED to pin 13, 12 ,11 respectively | |
| void setup() | |
| { | |
| pinMode(13, OUTPUT); | |
| pinMode(12, OUTPUT); | |
| pinMode(11, OUTPUT); | |
| } | |
| void loop() |
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> | |
| 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() |
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
| 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); |
OlderNewer