bdraco / relay_dev_demo

Dingtian Relay Development Board Demo source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dingtian Relay Development Board demo source code

This Demo source for Dingtian Relay Development Board

Demo Source

  • Ethernet
  • WiFi AP
  • WiFi Station
  • GPIO
  • CAN bus
  • RS485 bus
  • HTTP Server
  • MQTT
  • RTC(PCF8563) and NTP(only 16ch and 32ch)
  • Wiegand(only 16ch and 32ch)

Supported Dingtian devices

  • Dingtian Relay 2 Channel DT-R002
  • Dingtian Relay 4 Channel DT-R004
  • Dingtian Relay 8 Channel DT-R008
  • Dingtian Relay 16 Channel DT-R016
  • Dingtian Relay 32 Channel DT-R032

Dingtian Relay Development Board order from

Dingtian Relay Development Board GPIO pinout and PHY datasheet

PHY JL1101

step 1: install ESP-IDF

step 2: patch dingtian code for ESP-IDF

  • folder "esp-idf-dt-patch" is dingtian patch for ESP-IDF
  • please copy "esp-idf-dt-patch/components" to ESP-IDF "components"
  • if you ESP-IDF is not V4.3.1,you need modify "esp_eth_phy.h" and "CMakeLists.txt" by manual

step 3: install esp-link drivers

folder "esp_link_driver" have three driver

  • CH34X_linux
  • CH34X_MAC
  • CH34X_windows

step 4: open "ESP-IDF 4.3 CMD"

image

step 5: clone demo source code

git clone https://github.com/dtlzp/relay_dev_demo.git relay_dev_demo

step 6: update demo source code

cd relay_dev_demo
git pull

step 7: compile 16ch "gpio" demo example

  • "make.bat" default COM port is "COM17",you need change to you COM port
  • edit "common/channel.h" for 16ch
//#define DT_2CH  1
//#define DT_4CH  1
//#define DT_8CH  1
#define DT_16CH 1
//#define DT_32CH 1
  • compile "gpio" demo
cd relay_dev_demo
cd gpio
make.bat a
make.bat fm

About

Dingtian Relay Development Board Demo source code

License:MIT License


Languages

Language:C 91.2%Language:Batchfile 5.0%Language:CMake 2.0%Language:Makefile 1.6%Language:HTML 0.1%