Raspberry Pi

Lưu ý:

  • Xem sơ đồ chân của Raspberry Pi tại đây

  • Tài khoản mặc định của Raspberry Pi:

Hướng dẫn:

Bước 1: Cài Raspbian OS cho Raspberry Pi (Hướng dẫn hoặc Hướng dẫn).

Bước 2: Kết nối màn hình (bằng hdmi) hoặc remote Raspberry Pi (bằng ssh Hướng dẫn).

Bước 3: Kết nối internet cho Raspberry Pi (Wifi hoặc Ethernet).

Bước 4: Mở terminal trên Raspberry Pi.

Bước 5: Cài đặt thư viện Wiring Pi bằng terminal.

http://wiringpi.com/download-and-install/

Bước 6: Tải thư viện ERa và build ERa bằng terminal.

$ git clone https://github.com/eoh-jsc/era-lib.git
$ cd era-lib/linux
$ make clean all target=raspberry

Bước 7: Run ERa bằng terminal (thay YourAuthToken bằng ERa token – Lấy được từ bước 3 add gateway trên App dashboard).

$ sudo ./era --token=YourAuthToken

Lưu ý:

Để sử dụng được uart của raspberry để giao tiếp với modbus, zigbee... cần enable uart hardware và disable uart console xem hướng dẫn tại đây.

Kết nối Modbus:

Kết nối module Modbus với board Raspberry Pi theo sơ đồ chân bên dưới.

Module Modbus

RASPBERRY PI

RX

GPIO 15

TX

GPIO 14

Tham khảo thêm tại:

Installing Libraries | Arduino Documentation | Arduino Documentation

Library Management — PlatformIO latest documentation

Mở wed để tạo mới gateway ESP32 vào E-ra

pageRaspberry Pi_Chạy code tại Terminal

Last updated