บทความ

กำลังแสดงโพสต์จาก มีนาคม, 2019

mini project arduino

รูปภาพ
code #include <Password.h> #include <Keypad.h>  Password password = Password( "0000" ); //password to unlock, can be changed const byte ROWS = 4; // Four rows const byte COLS = 3; // columns // Define the Keymap char keys[ROWS][COLS] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'}, {'*','0','#'} }; // Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins. byte rowPins[ROWS] = {8, 7, 6, 5 };// Connect keypad COL0, COL1 and COL2 to these Arduino pins. byte colPins[COLS] = { 4, 3, 2 }; // Create the Keypad Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); void setup(){   pinMode(10, OUTPUT);    pinMode(11, OUTPUT);  //green light   pinMode(12, OUTPUT);  //red light      keypad.addEventListener(keypadEvent); //add an event listener for this keypad   } void loop(){...

MiniProject

รูปภาพ
MiniProject  อุปกรณ์ 1. PIC16F877A 2. IC 7 SEGMENT 7448 3. IC 7400 4. 7 SEGMENT  COMMON CATHODE 5. CRYSTAL 4MHz 6. CAPACITOR 22pF Code void main() {      unsigned char dice[]={0b00000001,0b00000010,0b00000011,0b00000100,0b00000101,0b00000110,0b00000111,0b00001000,0b00001001};      unsigned char i;      unsigned char Num[]= {0b00010000,0b00100000,0b00110000,0b01000000,0b01010000,0b01100000,0b01110000,0b10000000,0b10010000      ,0b00000001,0b00010001,0b00100001,0b00110001,0b01000001,0b01010001,0b01100001,0b01110001,0b10000001,0b10010001,0b00000010      ,0b00010010,0b00100010,0b00110010,0b01000010};      unsigned char a;      TRISB=0xFF;      TRISC=0;      TRISD=0;      PORTD=0;      PORTB =1;      while(1)      {   ...