การใช้ Arduino ร่วมกับ NodeMCU/ESP8266 จะมีด้วยกันหลายแบบ เช่น I2C, Serial เพื่อเพิ่ม I/O เช่นเพิ่มขา digital, ขา analog ในที่นี้จะยกตัวอย่างการสื่อสารแบบ Serial ก่อนเพราะเป็นตัวอย่างที่ง่ายต่อการเข้าใจ ในตัวอย่างจะเป็นการส่งค่าระหว่าง Arduino กับ NodeMCU โดยกำหนดให้ Arduino ส่งค่า int (จำนวนเต็ม) และ float (ทศนิยม) ไปยัง NodeMCU โดยสมมติว่า Arduino กำลังส่งค่าอะไรบางอย่างเป็นจำนวนเต็ม (int) และกำลังอ่านค่า Sensor เป็นทศนิยม (float) จากตัวอย่าง เราสามารถนำค่าที่ NodeMCU อ่านได้เป็น int และ float ไปใช้งานได้เลยโดยใช้ฟังก์ชั่น parseInt()parseFloat() ในส่วนของโค้ดโปรแกรมจะมีด้วยกันสองฝั่งคือ ฝั่งArduino และ ฝั่งNodeMCU

หมายเหตุ สามารถใช้กับ Arduino รุ่นใดก็ได้ หรือจะเอาไปใช้งานในการเพิ่ม output ให้กับ Nodemcu ก็ได้

Read More

Download library arduino

LCD 16×2 : LiquidCrystal.zip
4×4 Matrix KEYPAD : HCMatrixKeypad.zip
OLED : จอ OLED :: OLED Adafuit1   และ  OLED Adafuit2
DH11 : Adafuit DH11
Ultrasonic sensor HC-SR04 : Download
AM2320 : Download
MM7361 : Download
8×8 Max7219 LED Matrix  : Download
การติดตั้ง Library บน Arduino : ที่นี่

โปรแกรมที่จำเป็น
โปรแกรมสร้างภาพบนจอ LCD,OLED : Download

Another illustration that demonstrate how to wire the i2c 16×2 LCD on ESP8266 12 Known as NodeMCU, as you can see the diagram below the SCL as Arduino Analog Pin A4 is connected to D1 on NodeMCU at the same time the D2 as the SDA represent as Analog Pin A5 on Arduino Board, As you may notice that the sketch code that we used it is not LUA script it is actually standard Arduino C compiled/Interpret by Arduino IDE. If you don’t have an ESP8266 runs on Arduino IDE please follow this link.

Read More

Introduction

Do you have a 3.3V I2C or SPI sensor that might go up in smoke if connected to a 5V Arduino? Or a 5V device that needs a workaround to be compatible with your 3.3V Raspberry PiArduino Due or pcDuino?

To get over this obstacle you need a device that can shift 3.3V up to 5V or 5V down to 3.3V. This is called logic level shifting. Level shifting is a dilemma so common we designed a simple PCB assembly to make interfacing devices a little easier: the Bi-Directional Logic Level Converter.

Iso of Bi-Directional Logic Level Shifter

Read More

มีคนชวนเล่น Blynk ก็เลยลองเล่นบ้าง Blynk เป็น platform ที่ช่วยให้คุณเชื่อมต่อ Arduino, Raspberry Pi, ESP8266 กับ Mobile App ได้ง่ายมากขึ้น ง่ายจนแทบไม่ต้องทำอะไรเลย ข้อดีของ Blynk คือไม่ต้องมี board อะไรพิเศษ เอา Board เดิมๆ มาเล่นได้เลย อ้อเกือบลืมไปต้องต่อ internet ได้ด้วยนะ

Read More

IC Voltage Regulator เป็น IC ที่แปลงจากแรงดันที่สูงกว่า(Vin) ให้เป็นแรงดันที่ต่ำกว่าและเรียบคงที่(Vout) โดยในบทความนี้จะกล่าวถึง IC 78xx Series ซึ่งเป็น Fixed Linear Voltage Regulator คือไม่สามารถเปลี่ยนแรงดันเอาต์พุตได้ (มี Linear Voltage Regulator บางตัวที่สามารถเปลี่ยนค่า Vout ได้ เช่น LM317)โดยแต่ละรุ่นใน   78xx Series ก็จะมีค่า แรงดันเอาต์พุตที่ต่างกันไป โดยการดูจากเลข2หลักท้ายของชื่อ IC เช่น 7805  ก็จะมีค่า แรงดันเอาต์พุต 5V

ชื่อ IC แรงดันเอาต์พุต(V)
7805 +5
7806 +6
7808 +8
7810 +10
7812 +12
7815 +15
7818 +18
7824 +24

Read More

สำหรับมือใหม่หลาย ๆ ท่านที่พึ่งจะหัดเล่นเจ้าตัว NodeMCU และเลือกไม่ถูกว่าจะเลือกเวอร์ชั่นไหน และมีความแตกต่างกันยังไง ลองมาดูความแตกต่างของแต่ละVersion กันเลย

Your Independent Project

You can use Arduino directly on several projects, but you can also create them independent of your Arduino board, that is, by creating a Standalone project, using only the ATmega micronator already written and tested with the required code, and a few components required for its operation.

We at the Digital Institute have tested and suggested this simple scheme of a standalone project, we have produced a simple graphic scheme so that you can better understand its operation.
Feel free to swap or remove components you find necessary. Watch out for voltage and voltages so as not to damage its components.

Read More