This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| cfnet:cfdi16b [2026/02/21 23:49] – created - external edit 127.0.0.1 | cfnet:cfdi16b [2026/02/22 00:06] (current) – admin | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| =====Wiring method===== | =====Wiring method===== | ||
| - | {{: | + | {{.: |
| ===== Setting the module' | ===== Setting the module' | ||
| * Up to 8 CFDI-16Bs can be used in one system with different address settings of 0~7. | * Up to 8 CFDI-16Bs can be used in one system with different address settings of 0~7. | ||
| - | {{ : | + | {{ .: |
| - | =====How to use the API===== | + | |
| - | 1. < | + | [[index|CFNET]] |
| - | 2. CFNET object creation: '' | ||
| - | 3. Call the function(s): | ||
| - | \\ | ||
| - | ====-u16 digitalRead(u8 address); | ||
| - | The input status of the entire specified address module is read as a 16-bit value. | ||
| - | |||
| - | * address: module dip switch value (0~7) | ||
| - | ====-bool digitalRead(u8 address, u16 pin); ==== | ||
| - | Returns the state of a single pin as a boolean value. (1 bit read) | ||
| - | |||
| - | * '' | ||
| - | * '' | ||
| - | |||
| - | |||
| - | |||
| - | <code c> | ||
| - | #include " | ||
| - | |||
| - | CFNET cfnet; | ||
| - | |||
| - | void setup() { | ||
| - | | ||
| - | } | ||
| - | |||
| - | void loop() { | ||
| - | |||
| - | u16 blockK0 = cfnet.digitalRead(0); | ||
| - | bool portIn0 = cfnet.digitalRead(0, | ||
| - | |||
| - | | ||
| - | | ||
| - | | ||
| - | } | ||
| - | |||
| - | </ | ||
| - | |||
| - | |||
| - | [[modularfaduino: | ||