Skip to content

Commit edff473

Browse files
committed
add duo wiringx examples
1 parent c589bc7 commit edff473

File tree

2 files changed

+60
-0
lines changed
  • docs/duo/application-development
  • i18n/zh/docusaurus-plugin-content-docs/current/duo/application-development

2 files changed

+60
-0
lines changed

docs/duo/application-development/wiringx.md

+30
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,30 @@ Source code: [https://github.com/milkv-duo/duo-examples/tree/main/i2c/ssd1306_i2
328328

329329
Display strings on SSD1306 OLED display via I2C interface.
330330

331+
#### ADXL345 Three-axis acceleration sensor
332+
333+
Source code: [https://github.com/milkv-duo/duo-examples/blob/main/i2c/adxl345_i2c](https://github.com/milkv-duo/duo-examples/blob/main/i2c/adxl345_i2c)
334+
335+
Read the acceleration data obtained by ADXL345 through the I2C interface, read it every 1 second, and print the result on the screen.
336+
337+
#### LCM1602 Display Moudle
338+
339+
Source code: [https://github.com/milkv-duo/duo-examples/blob/main/i2c/lcm1602_i2c](https://github.com/milkv-duo/duo-examples/blob/main/i2c/lcm1602_i2c)
340+
341+
Display strings on the 1602 LCD screen via the I2C interface.
342+
343+
#### LCM2004 Display Moudle
344+
345+
Source code: [https://github.com/milkv-duo/duo-examples/blob/main/i2c/lcm2004_i2c](https://github.com/milkv-duo/duo-examples/blob/main/i2c/lcm2004_i2c)
346+
347+
Display string on 2004 LCD screen via I2C interface.
348+
349+
#### TCS34725 Color sensor
350+
351+
Source code: [https://github.com/milkv-duo/duo-examples/blob/main/i2c/tcs34725_i2c](https://github.com/milkv-duo/duo-examples/blob/main/i2c/tcs34725_i2c)
352+
353+
Read the TCS34725 color sensor through the I2C interface and output the obtained data.
354+
331355
### SPI
332356

333357
SPI source code directory: [https://github.com/milkv-duo/duo-examples/tree/main/spi](https://github.com/milkv-duo/duo-examples/tree/main/spi)
@@ -338,6 +362,12 @@ Source code: [https://github.com/milkv-duo/duo-examples/tree/main/spi/max6675_sp
338362

339363
Connect the K-type thermocouple measurement module MAX6675 through the SPI interface to measure the current temperature on the sensor.
340364

365+
#### RC522 Radio Frequency Identification Module
366+
367+
Source code: [https://github.com/milkv-duo/duo-examples/tree/main/spi/rc522_spi](https://github.com/milkv-duo/duo-examples/tree/main/spi/rc522_spi)
368+
369+
Connect the RC522 RFID read-write module via the SPI interface to read the card ID and type and output them to the screen.
370+
341371
## 4. Compile wiringX
342372

343373
Duo firmware already contains the compiled wiringX library (/usr/lib/libwiringx.so) and can be used directly. If you need to compile the source code of wiringX to generate the library, you can compile it as follows.

i18n/zh/docusaurus-plugin-content-docs/current/duo/application-development/wiringx.md

+30
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,30 @@ I2C 代码目录:[https://github.com/milkv-duo/duo-examples/tree/main/i2c](htt
327327

328328
通过 I2C 接口在 SSD1306 OLED 显示屏上显示字符串。
329329

330+
#### ADXL345 三轴加速度传感器
331+
332+
源码:[https://github.com/milkv-duo/duo-examples/blob/main/i2c/adxl345_i2c](https://github.com/milkv-duo/duo-examples/blob/main/i2c/adxl345_i2c)
333+
334+
通过 I2C 接口读取 ADXL345 获得的加速度数据,每 1s 读取一次,并将结果打印在屏幕上。
335+
336+
#### LCM1602 显示屏
337+
338+
源码:[https://github.com/milkv-duo/duo-examples/blob/main/i2c/lcm1602_i2c](https://github.com/milkv-duo/duo-examples/blob/main/i2c/lcm1602_i2c)
339+
340+
通过 I2C 接口在 1602 LCD 屏幕上显示字符串。
341+
342+
#### LCM2004 显示屏
343+
344+
源码:[https://github.com/milkv-duo/duo-examples/blob/main/i2c/lcm2004_i2c](https://github.com/milkv-duo/duo-examples/blob/main/i2c/lcm2004_i2c)
345+
346+
通过 I2C 接口在 2004 LCD 屏幕上显示字符串。
347+
348+
#### TCS34725 颜色传感器
349+
350+
源码:[https://github.com/milkv-duo/duo-examples/blob/main/i2c/tcs34725_i2c](https://github.com/milkv-duo/duo-examples/blob/main/i2c/tcs34725_i2c)
351+
352+
通过 I2C 接口读取 TCS34725 颜色传感器,并将获得的数据输出。
353+
330354
### SPI
331355

332356
SPI 代码目录:[https://github.com/milkv-duo/duo-examples/tree/main/spi](https://github.com/milkv-duo/duo-examples/tree/main/spi)
@@ -337,6 +361,12 @@ SPI 代码目录:[https://github.com/milkv-duo/duo-examples/tree/main/spi](htt
337361

338362
通过 SPI 接口连接 K 型热电偶测量模块 MAX6675,测量当前传感器上的温度。
339363

364+
#### RC522 RFID读写模块
365+
366+
源码:[https://github.com/milkv-duo/duo-examples/tree/main/spi/rc522_spi](https://github.com/milkv-duo/duo-examples/tree/main/spi/rc522_spi)
367+
368+
通过 SPI 接口连接 RC522 RFID 读写模块,读取卡片 ID 和类型并输出到屏幕。
369+
340370
## 四、编译 wiringX
341371

342372
Duo 固件中已经包含编译好的 wiringX 库(/usr/lib/libwiringx.so),可以直接使用。如果你需要通过编译 wiringX 的源码来生成该库,可以按如下方法编译。

0 commit comments

Comments
 (0)