บทความ

สรุป Artifical intelligence

ปัญญาประดิษฐ์  ( อังกฤษ :  artificial intelligence ) หรือ   เอไอ  ( AI ) หมายถึง ความฉลาด เทียมที่สร้างขึ้นให้กับสิ่งที่ไม่มีชีวิต ปัญญาประดิษฐ์เป็นสาขาหนึ่งในด้าน วิทยาการคอมพิวเตอร์ และ วิศวกรรม เป็นหลัก แต่ยังรวมถึงศาสตร์ในด้านอื่น ๆ อย่าง จิตวิทยา   ปรัชญา   หรือ ชีววิทยา   ซึ่งสาขาปัญญาประดิษฐ์เป็นการเรียนรู้เกี่ยวกับกระบวนการการคิด   การกระทำ   การให้เหตุผล การปรับตัว   หรือ การอนุมาน   และการทำงานของ สมอง   แม้ว่าดังเดิมนั้นเป็นสาขาหลักในวิทยาการคอมพิวเตอร์ แต่แนวคิดหลาย ๆ อย่างในศาสตร์นี้ได้มาจากการปรับปรุงเพิ่มเติมจากศาสตร์อื่น ๆ เช่น การเรียนรู้ของเครื่อง   นั้นมีเทคนิคการเรียนรู้ที่เรียกว่า   การเรียนรู้ต้นไม้ตัดสินใจ   ซึ่งประยุกต์เอาเทคนิคการ อุปนัย ของ จอห์น สจวร์ต มิลล์   นักปรัชญา ชื่อดังของ อังกฤษ   มาใช้ เครือข่ายประสาทเทียม ก็นำเอาแนวคิดของการทำงานของสมองของมนุษย์ มาใช้ในการแก้ปัญหา การแบ่งประเภท ของข้อมูล และแก้ปัญหาอื่น ๆ ทาง สถิติ   เช่น   การวิเคราะห์ความถดถอย หรือ ...

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)      {   ...

mikro c 6

รูปภาพ
 ใบรายงานผลการปฏิบัติงาน Code PORTB = Hex(s%10); PORTD.F2 = 1; Delay_ms(10); PORTD.F2 = 0; PORTB = Hex((s/10)%10); PORTD.F1 = 1; Delay_ms(10); PORTD.F1 = 0; PORTB = Hex((s/100)%10); PORTD.F0 = 1; Delay_ms(10); PORTD.F0 = 0; unsigned int Hex(int a) { switch(a) { case 1: return 0x06; case 2: return 0x5B; case 3: return 0x4F; case 4: return 0x66; case 5: return 0x6D; case 6: return 0x7D; case 7: return 0x07; case 8: return 0x7F; case 9: return 0x6F; case 0: return 0x3F; } } ภาพจำลองการทำงานด้วยโปรแกรม Proteus อ้างอิง https://electrosome.com/matrix-keypad-pic-microcontroller/

mikro c5

รูปภาพ
   ใบรายงานผลการปฏิบัติงาน Code char readKeyboard() { unsigned int i = 0; for(i=0;i<4;i++) { if(i == 0) PORTB = 1; else if(i == 1) PORTB = 2; else if(i == 2) PORTB = 4; else if(i == 3) PORTB = 8; if(PORTB.F4) return findKey(i,0); if(PORTB.F5) return findKey(i,1); if(PORTB.F6) return findKey(i,2); if(PORTB.F7) return findKey(i,3); } return ' '; } char findKey(unsigned short a, unsigned short b) { if(b == 0) { if(a == 3) return '0'; else if(a == 2) return '1'; else if(a == 1) return '2'; else if(a == 0) return '3'; } else if(b == 1) { if(a == 3) return '4'; else if(a == 2) return '5'; else if(a == 1) return '6'; else if(a == 0) return '7'; } else if(b == 2) { if(a == 3) return '8'; else if(a == 2) return '9'; else if(a == 1) return 'A'; else if(a == 0) r...

mikro c 4

รูปภาพ
    ใบรายงานผลการปฏิบัติงาน Code sbit LCD_RS at RB4_bit ; sbit LCD_EN at RB5_bit ; sbit LCD_D4 at RB0_bit ; sbit LCD_D5 at RB1_bit ; sbit LCD_D6 at RB2_bit ; sbit LCD_D7 at RB3_bit ;   sbit LCD_RS_Direction at TRISB4_bit ; sbit LCD_EN_Direction at TRISB5_bit ; sbit LCD_D4_Direction at TRISB0_bit ; sbit LCD_D5_Direction at TRISB1_bit ; sbit LCD_D6_Direction at TRISB2_bit ; sbit LCD_D7_Direction at TRISB3_bit ; unsigned int adcvalue , value , temp_res ; unsigned char car , x , y ; char * voltage = "00.00" ; long temp ;   // Routine to show the value of the ADC_read void ShowADC ( int x , int y , unsigned int adcvalue ) { car = adcvalue / 1000 ; LCD_Chr ( x , y , 48 + car ) ; adcvalue = adcvalue - 1000 * car ; car = ( adcvalue / 100 ) ; LCD_Chr_CP ( 48 + car ) ; adcvalue = adcvalue - 100 * car ; car = ( adcvalue / 10 ) ; LCD_Chr_CP ( 48 + car ) ; adcvalue = adcvalue - 10 * car ; car = adcvalue ; LCD_Chr_CP ( 48 + c...

mikro c 3

รูปภาพ
                 ใบรายงานผลการปฏิบัติงาน Code unsigned int i; unsigned int duty_50; void main(){ ADPCFG = 0xFFFF; // initialize AN pins as digital PORTB = 0xAAAA; TRISB = 0; // initialize portb as output Delay_ms(1000); duty_50 = PWM1_MC_Init(5000, 0, 0x01, 0); // Pwm_Mc_Init returns 50% of the duty PWM1_MC_Set_Duty(i = duty_50, 1); PWM1_MC_Start(); do { i--; PWM1_MC_Set_Duty(i, 1); Delay_ms(10); if (i == 0) i = duty_50 * 2 - 1; // Let us not allow the overflow PORTB = i; } while(1); ภาพจำลองการทำงานด้วยโปรแกรม Proteus อ้างอิง http://download.mikroe.com/documents/compilers/mikroc/dspic/help/pwm_motor_library.htm