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<reg51.h> | |
#define led P0 | |
sbit sw1=P2^0; | |
sbit sw2=P2^1; | |
sbit sw3=P2^2; | |
sbit sw4=P2^3; | |
unsigned char ch[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; | |
//void delay (int); | |
void display (unsigned long int); | |
void sdelay (char); |
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 rec=2; | |
int play=3; | |
int sensor=4; | |
int led=13; | |
void setup() | |
{ | |
pinMode(rec,OUTPUT); | |
pinMode(play,OUTPUT); | |
pinMode(led,OUTPUT); |
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<reg51.h> | |
#define lcd P3 | |
#define dat P2 | |
sbit rs=P1^6; | |
sbit e=P1^7; | |
void delay (int); | |
void display (unsigned char); | |
void cmd (unsigned char); |
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 Lane1[] = {13,12,11}; // Lane 1 Red, Yellow and Green | |
int Lane2[] = {10,9,8};// Lane 2 Red, Yellow and Green | |
int Lane3[] = {7,6,5};// Lane 3 Red, Yellow and Green | |
int Lane4[] = {4,3,2};// Lane 4 Red, Yellow and Green | |
void setup() | |
{ | |
for (int i = 0; i < 3; i++) | |
{ | |
pinMode(Lane1[i], OUTPUT); |
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 <Wire.h> | |
#include <LiquidCrystal.h> | |
#include "RTClib.h" | |
DateTime now; | |
char daysOfTheWeek[7][12] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; | |
RTC_DS3231 rtc; | |
LiquidCrystal lcd(7, 6, 5, 4, 3, 2); // (rs, e, d4, d5, d6, d7) |
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 <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x3F, 16, 2); | |
void setup() | |
{ | |
lcd.init(); | |
lcd.backlight(); | |
lcd.setCursor(0,0); |
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
ORG 00H ; Assembly Starts from 0000H. | |
; Main Program | |
START: MOV P1, #0XFF ; Move 11111111 to PORT1. | |
CALL WAIT ; Call WAIT | |
MOV A, P1 ; Move P1 value to ACC | |
CPL A ; Complement ACC | |
MOV P1, A ; Move ACC value to P1 | |
CALL WAIT ; Call WAIT | |
SJMP START ; Jump to START | |
WAIT: MOV R2, #10 ; Load Register R2 with 10 (0x0A) |
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 <ESP8266WiFi.h> | |
const char* ssid = "SSID";//type your ssid | |
const char* password = "PASSWORD";//type your password | |
int relayPin = 2; // GPIO2 of ESP8266 | |
WiFiServer ESPserver(80);//Service Port | |
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
import processing.serial.*; | |
import processing.opengl.*; | |
import toxi.geom.*; | |
import toxi.processing.*; | |
ToxiclibsSupport gfx; | |
Serial port; | |
String serialAngle; |
NewerOlder