บทความ

Flow Chart

รูปภาพ
Flow Chart Flow Chart คือ • แผนภาพที่ใชส้ าหรับ ลาดับขัน้ ตอนและวิธีการทางาน แบบเป็น ลาดับโดยการทางานจะเรมิ่ จากจุดเรมิ่ ตน้ (Start) ไปยัง จุดสิ้นสุด (Stop) ของโปรแกรม ซงึ่ เราสามารถใช ้ Flowchart เป็นเครอื่ งมือในการตรวจสอบอัลกอริทึมดว้ ยวิธีการ ไล่โปรแกรม (Tracing) เพอื่ หา ขอ้ ผิดพลาดของโปรแกรม (Bug) ของ โปรแกรมไดอี้กดว้ ย • ผังปฏิบัติงาน (Work Flow) คือ รูปภาพ(Image) หรือ สัญลักษณ์(Symbol) ที่ใชเ้ขียนแทนขัน้ ตอน คาอธิบาย ขอ้ ความ หรือคาพูด ที่ใชใ้ นกิจกรรมปฏิบัติงาน เพราะการ นาเสนอขัน้ ตอนของการปฏิบัติงาน ใหเ้ ขา้ ใจกัน ระหว่าง ผูเ้ กี่ยวขอ้ ง ดว้ ยคาพูด หรือขอ้ ความ ทาไดย้ ากกว่าเมือใช ้ รูปภาพ หรือสัญลักษณ์ สัญลักษณ์ของผังปฏิบัติงาน • เครื่องหมายรูปแบบต่าง ๆ ที่ใชสื้่อความหมายใหเ้ ขา้ ใจ ตรงกัน ผูก้ าหนดสัญลักษณ์นี้ขึ้น คือ สถาบันมาตรฐาน แห่งชาติอเมริกา(The American National Standard Institute : ANSI) ไดก้ าหนดไวเ้ ป็นมาตรฐาน เป็นที่ สื่อความหมายเขา้ ใจตรงกัน สัญลักษณ์ Flowchart (ผังงาน) รูปภาพสัญลักษณ์ ความหมายของสัญลักษณ์ Start / End การเริ่มต้นหรือ...

งานแก้

รูปภาพ
How To Make Arduino Based Home Automation Project via Bluetooth? 1.Hardware  (Input, Output) Arduino UNO:       The 8 – bit ATmega 328P microcontroller based Arduino UNO is used in the project to control different components like Bluetooth module and relay network. Bluetooth Module:       The Bluetooth Module used in this project is HC- 05. As seen in the image below, this Bluetooth module has 4 – pins for VCC (5V), ground, TX and RX. 2.Software  #include <SoftwareSerial.h> const int rxPin = 4; const int txPin = 2;               SoftwareSerial mySerial(rxPin, txPin); const int Loads[] = {9, 10, 11, 12}; int state = 0; int flag = 0; void setup() {    for (int i=0;i<4;i++)     {       pinMode(Loads[i], OUTPUT);     }  ...

งานที่18

รูปภาพ
Code #include <SoftwareSerial.h> #include <DHT11.h> //============================================= #include <Wire.h>  #include <LiquidCrystal_I2C.h> //LiquidCrystal_I2C lcd(0x27, 16, 2); LiquidCrystal_I2C lcd(0x3F, 16, 2); SoftwareSerial ArduinoSerial(3, 2); // RX, TX //============================================= int SW_ON = 4,SW_OFF = 5,pin=6;//กำหนดขา INPUT  int Sun = 9,CSun = 0,Relay1 = 12, Relay2 = 11; //กำหนดขา OUTPUT    int ATL = A0,ATH = A1;//กำหนดขา Analog int VTL1 = 0,VTH1 = 0,TL = 0,TH =0,VRHL = 50,VRHH = 80;  DHT11 dht11(pin); //=============================================  void setup() {   lcd.begin();   Serial.begin(115200);   ArduinoSerial.begin(4800);   while (!Serial){     ;     }   //=====================================================    lcd.setCursor(0, 0);lcd.print("Elec Pattayatech");   lcd...

งานที่17

รูปภาพ
Code #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27,16,2); int aVal=0,tempaVal=0; const int SW_ON = 2; const int led_ON =  13; int CSW_ON = 0; int C_CSW_ON =0; int Relay1=12,Relay2=11,Relay3=10,Relay4=9; int sensorPin = A0; int sensorValue = 0; void setup() {   lcd.backlight();   lcd.begin();   Serial.begin(9600);   pinMode(led_ON, OUTPUT);pinMode(SW_ON, INPUT);   pinMode(Relay1,OUTPUT);pinMode(Relay2,OUTPUT);   pinMode(Relay3,OUTPUT);pinMode(Relay4,OUTPUT); //   digitalWrite(Relay1,HIGH);digitalWrite(Relay2,HIGH);   digitalWrite(Relay3,HIGH);digitalWrite(Relay4,HIGH);   lcd.setCursor(0,0);   lcd.print("Project2017");   lcd.setCursor(0,1);   lcd.print("standby"); } //END Setup void loop() {   CSW_ON = digitalRead(SW_ON);   sensorValue = analogRead(sensorPin);//Serial.println(sensorValue);   //===================================================================...

งานที่16

รูปภาพ
Code #include <Stepper.h> #include "Keypad.h" #define STEP_ANGLE_4STEP 32 //360/11.25 degree #define STEP_OUT_WITH_GEAR 2048 //32*64 Stepper stepper(STEP_ANGLE_4STEP,8,10,9,11); char keys[4][4]={   {'7','8','9','A'},   {'4','5','6','B'},   {'1','2','3','C'},   {'*','0','#','D'}}; byte rowPins[] = {7,6,5,4}; byte colPins[] = {3,2,1,0}; int speedmotor = 400; int dirmotor = 1; Keypad keypad = Keypad(makeKeymap(keys),rowPins,colPins,4,4); void setup() { } void loop() {   char key = keypad.getKey();   if (key != NO_KEY)   {         if (key == '1')             speedmotor = 400;         if (key == '2')             speedmotor = 700;         if (key == '3')             speedmotor = 1000;          if (key == 'A')           ...

งานที่15

รูปภาพ
Code #include <LedControl.h> #include <DHT11.h> int pin=4; DHT11 dht11(pin); LedControl lc=LedControl(8,10,9,1);  // Pin 8->DIN, 10->CLK, 9->CS(LOAD), 1 = No.of devices void show2digit(int h,int t) {   int seg1,seg2,seg3,seg4;   seg1 = h%10;   seg2 = h/10;   lc.setDigit(0,4,seg1,false);    lc.setDigit(0,5,seg2,false);   seg3 = t%10;   seg4 = t/10;   lc.setDigit(0,0,seg3,false);    lc.setDigit(0,1,seg4,false);   delay(300); } void setup() {   Serial.begin(9600);   while (!Serial) {       ; // wait for serial port to connect. Needed for Leonardo only     }   lc.shutdown(0,false);     lc.setIntensity(0,5);    lc.clearDisplay(0); } void loop() {   int err;   float temp, humi;   if((err=dht11.read(humi, temp))==0)   {     Serial.print("t...

งานที่14

รูปภาพ
Code #include <LedControl.h> #include <OneWire.h> #include <DallasTemperature.h> #define ONE_WIRE_BUS 11 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); float Tfloat; long Tint; LedControl lc=LedControl(8,10,9,1); // Pin 8->DIN, 10->CLK, 9->CS(LOAD), 1 = No.of devices void show6digit(int num) {   int seg1,seg2;   seg2 = (((((num%100000)%10000)%1000)%100)/10);   seg1 = (((((num%100000)%10000)%1000)%100)%10);   lc.setDigit(0,0,seg1,false);   if (num>=10)       lc.setDigit(0,1,seg2,false);   delay(300); } void setup(void) {   sensors.begin();   lc.shutdown(0,false);    lc.setIntensity(0,5);   lc.clearDisplay(0); } void loop(void) {   sensors.requestTemperatures();   Tfloat = sensors.getTempCByIndex(0);   Tint = int(Tfloat);   lc.clearDisplay(0);   show6digit(Tint); }