User Tools

Site Tools

한국어

cfnet:cfdo8r

Differences

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

Link to this comparison view

cfnet:cfdo8r [2026/02/21 23:49] – created - external edit 127.0.0.1cfnet:cfdo8r [2026/02/22 00:06] (current) admin
Line 12: Line 12:
  
 =====Wiring method===== =====Wiring method=====
-{{:modularfaduino:cfdo-8r.png?nolink |}}+{{.:cfdo-8r.png?nolink |}}
  
  
Line 19: Line 19:
 CFDO-8R shares an address with CFDO-16N module. In other words, addresses already in use by CFDO-16N cannot be used. CFDO-8R shares an address with CFDO-16N module. In other words, addresses already in use by CFDO-16N cannot be used.
  
-{{ :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;**''+[[index|CFNET]]
  
-3. Call the function(s): ''**Object name**.digitalWrite();'' => ''**cfnet**.digitalWrite(0, 0xff);'' 
-\\ 
-====-void digitalWrite(u8 address, u16 data) ==== 
-Turns all 8 output ports of the specified address module into On and Off states with 8bit data values. (8bit write) 
-  * ''address'': The address of the module as configured by its DIP switch (0~7) 
-  * ''data'': On/Off value between 0x00 and 0xFF (8bit) 
- 
- 
-====-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 ~ 7) 
-  * ''on_off'': 0 or 1 (0=off, 1=on) 
- 
-<code c> 
-#include "CFMEGA.h" 
-CFNET cfnet; 
- 
-void setup() { 
- cfnet.digitalWrite(0, 0XFF); delay(1000); 
- cfnet.digitalWrite(0, 0X00); delay(1000); 
-} 
- 
-void loop() { 
- for(int i=0; i<16; i++){ 
- cfnet.digitalWrite(0, i, 1 );delay(100); 
- } 
- cfnet.digitalWrite(0, 0X00); delay(1000); 
-} 
-</code> 
- 
- 
-[[modularfaduino:index|Modular FADUINO]] 
cfnet/cfdo8r.1771717769.txt.gz · Last modified: by 127.0.0.1