Node.js ကျူတိုရီရယ်

Node.js ပင်မစာမျက်နှာ Node.js နိဒါန်း Node.js ကို စတင်လိုက်ပါ။ Node.js မော်ဂျူးများ Node.js HTTP မော်ဂျူး Node.js ဖိုင်စနစ် Node.js URL မော်ဂျူး Node.js NPM Node.js ပွဲများ Node.js ဖိုင်များ အပ်လုဒ်လုပ်ခြင်း။ Node.js အီးမေးလ်

Node.js MySQL

MySQL စတင်လိုက်ပါ။ MySQL ဒေတာဘေ့စ်ဖန်တီးပါ။ MySQL ဇယားဖန်တီးပါ။ MySQL ထဲသို့ ထည့်သွင်းပါ။ MySQL မှ ရွေးချယ်ပါ။ MySQL ဘယ်မှာလဲ။ MySQL Order By MySQL ကိုဖျက်ပါ။ MySQL Drop Table MySQL အပ်ဒိတ် MySQL ကန့်သတ်ချက် MySQL Join

Node.js MongoDB

MongoDB စတင်လိုက်ပါ။ MongoDB ဒေတာဘေ့စ်ဖန်တီးပါ။ MongoDB သည် Collection ကိုဖန်တီးပါ။ MongoDB ထည့်သွင်းပါ။ MongoDB ကိုရှာပါ။ MongoDB မေးခွန်း MongoDB အမျိုးအစား MongoDB ကိုဖျက်ပါ။ MongoDB Drop Collection MongoDB အပ်ဒိတ် MongoDB ကန့်သတ်ချက် MongoDB Join

Raspberry Pi

RasPi စတင်လိုက်ပါ။ RasPi GPIO နိဒါန်း RasPi မှိတ်တုတ်မှိတ်တုတ် LED RasPi LED နှင့် ခလုတ်နှိပ်ပါ။ RasPi စီးဆင်းနေသော LED များ RasPi WebSocket RasPi RGB LED WebSocket RasPi အစိတ်အပိုင်းများ

Node.js အ ကိုး အကား

Built-in Modules များ

Node.js Raspberry Pi - အစိတ်အပိုင်းများ


အစိတ်အပိုင်းတွေက ဘာတွေလဲ။

အစိတ်အပိုင်းများသည် ပိုမိုကြီးမားသော အစိတ်အပိုင်းများဖြစ်သည်။ ဤအခန်းတွင် ကျွန်ုပ်တို့၏သင်ခန်းစာတွင် ကျွန်ုပ်တို့အသုံးပြုသည့် မတူညီသောအစိတ်အပိုင်းများကို ရှင်းပြထားပါသည်။


Raspberry Pi နှင့် GPIO Pins

GPIO နှင့်အတူ Raspberry Pi 3

ဤသည်မှာ Raspberry Pi 3 ၏ ပုံဥပမာဖြစ်သည်။

GPIO ပင်နံပါတ်များသည် Raspberry Pi ၏ညာဘက်ခြမ်းရှိ အနီရောင်စတုရန်းလေးများဖြစ်ပြီး တကယ့် Raspberry Pi တွင် ၎င်းတို့သည် သေးငယ်သောသတ္တုပင်များဖြစ်သည်။

Input pins များသည် ပြင်ပကမ္ဘာမှ ဖွင့်/ပိတ်နိုင်သော ခလုတ်များကဲ့သို့ဖြစ်သည် (အဖွင့်/အပိတ် မီးခလုတ်ကဲ့သို့)။

Output pins များသည် Raspberry Pi မှ အဖွင့်/အပိတ် ပြုလုပ်နိုင်သော ခလုတ်များနှင့် တူသည် (LED မီးဖွင့်/ပိတ် ကဲ့သို့)။

Raspberry Pi 3 တွင် GPIO pin 26 ခု ပါရှိပြီး ကျန် pins များမှာ ပါဝါ၊ မြေပြင် သို့မဟုတ် "အခြား" ဖြစ်သည်။

ပင်နံပါတ်နေရာများသည် အောက်ပါဇယားနှင့် ကိုက်ညီပါသည်။

Raspberry Pi B+၊ 2၊ 3 နှင့် သုည

3V3 5V
GPIO ၂ 5V
GPIO ၃ GND
GPIO ၄ GPIO ၁၄
GND ၁၀ GPIO ၁၅
GPIO ၁၇ ၁၁ ၁၂ GPIO ၁၈
GPIO ၂၇ ၁၃ ၁၄ GND
GPIO ၂၂ ၁၅ ၁၆ GPIO ၂၃
3V3 ၁၇ ၁၈ GPIO ၂၄
GPIO ၁၀ ၁၉ ၂၀ GND
GPIO ၉ ၂၁ ၂၂ GPIO ၂၅
GPIO ၁၁ ၂၃ ၂၄ GPIO ၈
GND ၂၅ ၂၆ GPIO ၇
DNC ၂၇ ၂၈ DNC
GPIO ၅ ၂၉ ၃၀ GND
GPIO ၆ ၃၁ ၃၂ GPIO ၁၂
GPIO ၁၃ ၃၃ ၃၄ GND
GPIO ၁၉ ၃၅ ၃၆ GPIO ၁၆
GPIO ၂၆ ၃၇ ၃၈ GPIO ၂၀
GND ၃၉ ၄၀ GPIO ၂၁

ဒဏ္ဍာရီ

Physical Pin Number
ပါဝါ+
မြေပြင်
UART
I2C
SPI
GPIO
မချိတ်ဆက်ပါနှင့်


ပေါင်မုန့်ပြား

breadboard ကို အီလက်ထရွန်းနစ်ပစ္စည်း ပုံတူရိုက်ခြင်းအတွက် အသုံးပြုပြီး ဆားကစ်များကို ဂဟေမပါဘဲ ဖန်တီးနိုင်စေပါသည်။ ၎င်းသည် အခြေခံအားဖြင့် ပလပ်စတစ်ဘုတ်ဖြစ်ပြီး ကြိုးမှတ်များ (အပေါက်များ) ပါရှိသည်။ ဘုတ်အဖွဲ့အတွင်းတွင် မတူညီသော ကြိုးအမှတ်များကို သီးခြားနည်းလမ်းများဖြင့် ချိတ်ဆက်ထားသော သတ္တုပြားများရှိသည်။

အောက်ဖော်ပြပါပုံတွင် ကျွန်ုပ်တို့သည် မတူညီသောအရောင်များဖြင့် ကဏ္ဍအချို့ကို မီးမောင်းထိုးပြထားသည်။ ဤသည်မှာ grid မည်ကဲ့သို့ ချိတ်ဆက်ထားသည်ကို သင့်အား ပြသရန်ဖြစ်သည်။

ချိတ်ဆက်မှုများကို မီးမောင်းထိုးပြထားသော ပေါင်မုန့်ပြား

ပေါင်မုန့်ဘုတ်၏ မတူညီသော အပိုင်းများ-

  • ဘယ်ဘက်၊ ညာဘက်တွင် တိုင်အမှတ် ၂ ခုရှိသည်။ ဤကော်လံတစ်ခုစီရှိ ကြိုးမှတ်များအားလုံးကို ချိတ်ဆက်ထားသည်။
  • Power Bus - အနီရောင်ဖြင့် မီးမောင်းထိုးပြထားသော ကော်လံများ။ Breadboard သို့ ပါဝါချိတ်ဆက်ရန် အသုံးပြုလေ့ရှိပါသည်။ ကော်လံတစ်ခုလုံးကို ချိတ်ဆက်ထားသောကြောင့်၊ သင်သည် ကော်လံရှိ ကြိုးမှတ်များအားလုံးကို ချိတ်ဆက်နိုင်သည်။
  • မြေပြင်ဘတ်စ်ကား - အပြာရောင်ဖြင့် မီးမောင်းထိုးထားသည့် ကော်လံများ။ Ground ကို Breadboard နဲ့ ချိတ်ဆက်ဖို့ အသုံးပြုလေ့ရှိပါတယ်။ ကော်လံတစ်ခုလုံးကို ချိတ်ဆက်ထားသောကြောင့်၊ သင်သည် ကော်လံရှိ ကြိုးမှတ်များအားလုံးကို မြေပြင်သို့ ချိတ်ဆက်နိုင်သည်။
  • ချိတ်ဆက်ထားသော Tie-Points အတန်းများ - အစိမ်းရောင်ဖြင့် မီးမောင်းထိုးပြထားသော အတန်းများ။ ဤအတန်းတစ်ခုစီ၏ တူညီသောအမှတ်များသည် ချိတ်ဆက်ထားသော်လည်း အတန်းတစ်ခုလုံးမဟုတ်ပေ။ ဘယ်ဘက် ချိတ်မှတ်များကို ချိတ်ဆက်ထားသည် (ABCDE) နှင့် ညာဘက်ခြမ်း ချိတ်မှတ်များကို ချိတ်ဆက်ထားသည် (FGHIJ)။
  • Breadboard ၏အလယ်တွင် Trench တစ်ခုရှိသည်၊ ၎င်းသည်ဘယ်နှင့်ညာဘက်အတန်းများကိုခွဲခြားထားသည်။ ကတုတ်ကျင်း၏ အကျယ်ကို ပေါင်းစည်းထားသော ဆားကစ်များစွာသည် ၎င်းနှင့် အံဝင်ခွင်ကျဖြစ်အောင် ဒီဇိုင်းထုတ်ထားသည်။

အခြားလျှပ်စစ်အစိတ်အပိုင်းများ

အပေါက် LED မှတဆင့်

Light emitting diode (LED)။ LED သည် ဗို့အားတစ်ခုသက်ရောက်သောအခါ အလင်းထုတ်လွှတ်သည့် ဒိုင်အိုဒဖြစ်သည်။ ကျွန်ုပ်တို့၏ဥပမာတွင်၊ ကျွန်ုပ်တို့သည်အပေါက်ဖောက် LED ကိုအသုံးပြုသည်။ ၎င်းတို့တွင် အပြုသဘော (Anode ဟုခေါ်သည်) နှင့် အနှုတ် (Cathode ဟုခေါ်သည်) pin ရှိသည်။ LED ပေါ်ရှိ ပိုရှည်သောခြေထောက်သည် positive pin ကိုညွှန်ပြသင့်သည်။

အပေါက် LED မှတဆင့်

RGB LED

Light emitting diode (LED). An LED is a diode that emits light when a voltage is applied to it. An RGB LED has 4 pins. One for each color (R = Red, G = Green, and, B = Blue), and a common cathode/anode. This one LED can display the pure colors, or with PWD to modulate and mix colors.

RGB LED

Push Button

A push button is a type of switch. A switch makes or breaks a connection an an electric circuit.

ချိတ်ဆက်မှုများကို မီးမောင်းထိုးပြထားသော ပေါင်မုန့်ပြား

Jumper Wire - Female to Male

Short pieces of wire called jumper wires are used to make connections. Female to Male jumper wires can be used to connect from the GPIO on the Raspberry Pi to the Breadboard.

အမျိုးသမီးမှ အထီးသို့ jumper ဝါယာကြိုးများ

Jumper Wire - Male to Male

Short pieces of wire called jumper wires are used to make connections. Male to Male jumper wires can be used to make connections between different parts of the Breadboard.

ချိတ်ဆက်မှုများကို မီးမောင်းထိုးပြထားသော ပေါင်မုန့်ပြား

Resistor - 68 Ohm

Resistors are used to reduce current, adjust signal levels, etc. This is a 68 Ohm resistor.

68 Ohm resistor

Resistor - 220 Ohm

Resistors are used to reduce current, adjust signal levels, etc. This is a 220 Ohm resistor.

220 Ohm ခုခံအား

Resistor - 1k Ohm

Resistors are used to reduce current, adjust signal levels, etc. This is a 1k Ohm resistor.

1k Ohm ခုခံအား


Node.js Modules

onoff - GPIO access and interrupt detection with Node.js

documentation

Socket.IO - real-time bidirectional event-based communication

documentation

pigpio - wrapper for pigpio C library. Enables GPIO, PWM, servo control, state change notification and interrupt handling with Node.js

documentation