ติดตั้ง GUI ให้ Ubuntu server

หลังจากที่เรา พบเจอกับการติดตั้ง ubuntu server ด้วยหน้าจอ ดำๆ แล้วนะครับ ถ้าเกิดเราอยากใช้มันในรูปแบบ ubuntu desktop ละจะทำยังไง

แน่นนอนมันมีวิธีครับ เรามาทำกันเลยดีกว่า

1. เข้า terminal
2. พิมตามนี้นะครับ
sudo apt-get install ubuntu-desktop (ผมจะข้าม get update,upgrade นะครับ)
3. นั่งรอครับ นานมาก สงสัยเน็ตผม เต่า
4. เมื่อได้แล้ว ให้เรา restart มันครับ ด้วยคำสั่ง restart
sudo reboot

ไม่ว่าเปิดขึ้นมาใหม่จะเป็น GUI หรือ Console ก็ตาม วิธีสรับมี 2 key ครับ คือ

– Ctrl + Alt + F1 เปลี่ยนเป็น หน้า Console ดำๆครับ ต้อง login ใหม่ด้วยนะครับ
– Ctrl + Alt + F7 เปลี่ยนเป็น หน้า GUI ครับ (unity นั้ันเอง)

การสร้างสคริปต์เพื่อสำรองฐานข้อมูล MariaDB บน Ubuntu นั้น สามารถทำได้โดยใช้คำสั่ง `mysqldump` ซึ่งเป็นเครื่องมือที่มาพร้อมกับ MariaDB และ MySQL สำหรับการสำรองข้อมูลฐานข้อมูล โดยทั่วไปแล้ว สคริปต์นี้สามารถรันโดยใช้ cron jobs เพื่อทำงานอัตโนมัติในช่วงเวลาที่กำหนด

ด้านล่างนี้คือตัวอย่างสคริปต์ Bash ที่คุณสามารถใช้เพื่อสำรองข้อมูล MariaDB:

1. สร้างไฟล์สคริปต์ใหม่ เช่น `backup_mariadb.sh`

“`bash
#!/bin/bash

# กำหนดค่าวันที่ปัจจุบัน
DATE=$(date +”%Y%m%d%H%M”)

# ตั้งค่าชื่อฐานข้อมูล, ผู้ใช้, และรหัสผ่าน
DB_NAME=”your_database_name”
DB_USER=”your_database_user”
DB_PASS=”your_database_password”

Read More

การเลือกขนาดเซอร์กิตเบรกเกอร์ย่อยกับขนาดสายไฟตามข้อกำหนดของการไฟฟ้า

สายไฟขนาด 1.5 sq.mm เบรกเกอร์ย่อยคุมขนาดไม่เกิน 10 Amp

สายไฟขนาด 2.5 Sq.mm เบรกเกอร์ย่อยคุมขนาดไม่เกิน  16 Amp

สายไฟขนาด 4.0 sq.mm เบรกเกอร์ย่อยคุมขนาดไม่เกิน 20 Amp

สายไฟขนาด 6.0 sq.mm เบรกเกอร์ย่อยคุมขนาดไม่ไม่เกิน 32 Amp

สายกราวน์ ( สายดิน ) อุปกรณ์ไฟฟ้าทั่วๆไป เเละ ที่จุดปลั๊กไฟขนาดสายไฟกราวน์ต้องไม่น้อยกว่า 2.5 sq.mm ( เดิมเป็นขนาด 1.5 sq.mm ถูกปรับเปลี่ยนเเล้วครับ )

ตาม มอก. 11-2531  L…สีดำ    N…สีเทาหรือขาว   G…สีเขียว หรือ เขียวเหลือง
ตาม มอก. 11-2553  L…สีฟ้า    N…สีน้ำตาล   G… สีเขียว หรือ เขียวเหลือง

In this tutorial, we will learn how to interface RFID reader RDM6300 or RDM630 with Arduino. Both of these RFID readers communicate via a serial connection on UART and follow the same interfacing with Arduino thus this tutorial will be compatible with both types of RFID readers. First, we will give you a brief description of the RDM6300 module which is cheaper than RDM630 and easily available, its pinout and connection with the Arduino Board. Then we will show you a sketch which will enable us to identify EM4100-compatible tags via this RFID reader.

We have a similar guide with ESP8266 and ESP32:

RDM6300 RFID reader

RFID stands for Radio Frequency Identification. It is a tagging identification system that uses electromagnetic waves in radio frequency to transfer data. An RFID system consists of a passive card or tag and an active read or write device which is RDM6300 in our case.

RDM6300 RFID module is a low-cost RFID reader. You can purchase it for less than 5$ as compared to RDM630 which costs approximately $10-15. Both of the modules work on a 125kHz radio frequency. Therefore, they are able to detect RFID tags or cards which can communicate with RFID readers at 125KHz frequency. RDM6300 RFID module works on transistor logic or in short TTL logic. It means you need to provide 5 volt dc to power supply pins of this module. It has a UART communication function. In other words, it can communicate with microcontroller through a UART serial communication.  It has TTL RS232 format.

Read More

When given a printable ASCII character as an argument, the functions Keyboard.write()Keyboard.press() and Keyboard.release() simulate actuations on the corresponding keys. These functions can also handle ASCII characters that require pressing a key in combination with Shift or, on international keyboards, AltGr. For example:

Keyboard.write('a');  // press and release the 'A' key
Keyboard.write('A');  // press Shift and 'A', then release both

A typical keyboard, however, has many keys that do not match a printable ASCII character. In order to simulate those keys, the library provides a set of macros that can be passed as arguments to Keyboard.write()Keyboard.press() and Keyboard.release(). For example, the key combination Shift+F2 can be generated by:

Keyboard.press(KEY_LEFT_SHIFT);  // press and hold Shift
Keyboard.press(KEY_F2);          // press and hold F2
Keyboard.releaseAll();           // release both

Note that, in order to press multiple keys simultaneously, one has to use Keyboard.press() rather than Keyboard.write(), as the latter just “hits” the keys (it presses and immediately releases them).

Read More