บทความ

กำลังแสดงโพสต์จาก กุมภาพันธ์, 2018

PROJECTS

รูปภาพ
#include <Keypad.h> #include<LiquidCrystal.h> #include<EEPROM.h> #define buzzer 15 LiquidCrystal lcd(13,12,11,10,9,8); char password[4]; char pass[4],pass1[4]; int i=0; char customKey=0; const byte ROWS = 4; //four rows const byte COLS = 4; //four columns char hexaKeys[ROWS][COLS] = {   {'1','2','3','A'},   {'4','5','6','B'},   {'7','8','9','C'},   {'*','0','#','D'} }; byte rowPins[ROWS] = {3, 2, 1, 0}; //connect to the row pinouts of the keypad byte colPins[COLS] = {4, 5, 6, 7}; //connect to the column pinouts of the keypad //initialize an instance of class NewKeypad Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); void setup() {   lcd.begin(16,2);   pinMode(led, OUTPUT);   pinMode(buzzer, OUTPUT);   pinMode(m11, OUTPUT);   pinMode(m12, OUTPUT);   lcd.print("  Electron

งาน 6

รูปภาพ
void setup (){   pinMode(13,OUTPUT);   pinMode(12,OUTPUT);   pinMode(11,OUTPUT);   pinMode(10,OUTPUT);   pinMode(9,OUTPUT);   pinMode(8,OUTPUT);   pinMode(7,OUTPUT);   pinMode(6,OUTPUT);   pinMode(5,OUTPUT);   pinMode(4,OUTPUT);   pinMode(3,OUTPUT);   pinMode(2,OUTPUT);   pinMode(1,OUTPUT); } void loop(){   digitalWrite(11,HIGH);   digitalWrite(8,HIGH);   digitalWrite(7,HIGH);   digitalWrite(4,HIGH);   digitalWrite(12,LOW);   digitalWrite(3,HIGH);   delay(5000);   digitalWrite(11,LOW);   digitalWrite(12,HIGH);   digitalWrite(9,HIGH);   digitalWrite(8,LOW);   delay(2000);   digitalWrite(10,LOW);   digitalWrite(13,HIGH);   digitalWrite(12,HIGH);   digitalWrite(9,LOW);   delay(5000);   digitalWrite(10,LOW);   digitalWrite(9,HIGH);   digitalWrite(6,HIGH);   digitalWrite(7,LOW);   delay(2000);   digitalWrite(5,HIGH);   digitalWrite(8,HIGH);   digitalWrite(9,LOW);   digitalWrite(6,LOW);   delay(5000);   digitalWrite(5,LOW);   digitalWrite(6,H

งาน 5

รูปภาพ
 int led1=1;  int led2=2;  int led3=3;  int led4=4;  int led5=5;  int led6=6; void setup() {  pinMode(led1,OUTPUT);  pinMode(led2,OUTPUT);  pinMode(led3,OUTPUT);  pinMode(led4,OUTPUT);  pinMode(led5,OUTPUT);  pinMode(led6,OUTPUT); } void loop() {     digitalWrite(led6, HIGH);     delay(50);     digitalWrite(led6,LOW);     digitalWrite(led5, HIGH);     delay(50);     digitalWrite(led5,LOW);     digitalWrite(led4, HIGH);     delay(50);     digitalWrite(led4,LOW);     digitalWrite(led3, HIGH);     delay(50);     digitalWrite(led3,LOW);     digitalWrite(led2, HIGH);     delay(50);     digitalWrite(led2,LOW);     digitalWrite(led1, HIGH);     delay(50);     digitalWrite(led1,LOW); }