User Tools

Site Tools

한국어

cfnet:cfdo16n

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cfnet:cfdo16n [2026/02/21 23:49] – created - external edit 127.0.0.1cfnet:cfdo16n [2026/02/22 00:04] (current) admin
Line 4: Line 4:
  
 [[https://comfiletech.com/modular-faduino/cfdo-16n-digital-output-module/|View at our online store]]. [[https://comfiletech.com/modular-faduino/cfdo-16n-digital-output-module/|View at our online store]].
 +
 =====Electrical specifications===== =====Electrical specifications=====
   * Output Ports: 16    * Output Ports: 16 
Line 14: Line 15:
 =====Wiring method===== =====Wiring method=====
  
-{{:modularfaduino:cfdo16n.png?nolink |}}+{{.:cfdo16n.png?nolink |}}
  
 ===== Setting the module's address ===== ===== Setting the module's address =====
Line 22: Line 23:
  
  
-{{ :modularfaduino:dip_sw_0x00.png?nolink |}+{{ .:dip_sw_0x00.png?nolink |}}
- +
-=====How to use the API===== +
- +
-1. <html><code>#include "CFMEGA.h"</code></html> library registration  +
- +
-2. CFNET object creation: ''CFNET **object name**'' =>'' CFNET ** cfnet;**'' +
- +
-3. Call the function(s): ''**Object name**.digitalWrite();'' => ''**cfnet**.digitalWrite(0, 0xffff);'' +
-\\ +
-====-void digitalWrite(u8 address, u16 data) ==== +
- +
-Turns the output 16 ports of the specified address module into On and Off states with 16bit data values. (16bit write) +
-  * ''address'': The address of the module as configured by its DIP switch (0~7) +
-  * ''data'': On/Off value between 0x0000 and 0xFFFF (16bit) +
- +
- +
-====-void digitalWrite(u8 address, u8 pin, u8 on_off) ==== +
-Turns one port of the specified address module’s pin on or off. (1 bit write) +
-  * ''address'': The address of the module as configured by its DIP switch (0~7) +
-  * ''pin'': Pin index (0 ~ 15) +
-  * ''on_off'': 0 or 1 (0=off, 1=on) +
- +
-<code c> +
-#include "CFMEGA.h" +
-CFNET cfnet; +
- +
-void setup() { +
- cfnet.digitalWrite(0, 0XFFFF); delay(1000); +
- cfnet.digitalWrite(0, 0X0000); delay(1000); +
-}+
  
-void loop() { +[[index|CFNET]]
- for(int i=0; i<16; i++){ +
- cfnet.digitalWrite(0, i, 1 );delay(100); +
- } +
- cfnet.digitalWrite(0, 0X0000); delay(1000); +
-+
-</code>+
  
-[[modularfaduino:index|Modular FADUINO]] 
cfnet/cfdo16n.1771717769.txt.gz · Last modified: by 127.0.0.1