User Tools

Site Tools

한국어

cfnet:cfdac2v

Differences

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

Link to this comparison view

Next revision
Previous revision
cfnet:cfdac2v [2026/02/21 23:49] – created - external edit 127.0.0.1cfnet:cfdac2v [2026/02/22 00:08] (current) admin
Line 15: Line 15:
 =====Wiring method===== =====Wiring method=====
  
-{{:modularfaduino:cfdac_2vdesc.png?nolink |}}+{{.:cfdac_2vdesc.png?nolink |}}
  
 ===== Setting the module's address ===== ===== Setting the module's address =====
  * Up to 8 CFDAC-1Vs can be used in one system with different address settings of 0x00~0x07.  * Up to 8 CFDAC-1Vs can be used in one system with different address settings of 0x00~0x07.
  
-{{ :modularfaduino:dip_sw_0x00.png?nolink |}}+{{ .:dip_sw_0x00.png?nolink |}}
  
-=====How to use the API=====+[[index|CFNET]]
  
-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**.analogWrite();'' => ''**cfnet**.analogWrite(0, 0, 409);'' 
- 
-====-void analogWrite(u8 address, u8 channel, u16 data); ==== 
-Outputs the voltage (0 ~ 10V) corresponding to the provided ''data'' value to the ''channel'' of the module at ''address''. 
-  * ''address'': The address of the module as configured by its DIP switch (0~7) 
-  * ''channel'': Channel number (0~1) 
-  * ''data'': 0 ~ 4094 values ​​(0 ~ 10Vdc) 
- 
-<code c> 
-#include "CFMEGA.h" 
- 
-CFNET cfnet; 
- 
-void setup() { 
- } 
- 
-void loop() { 
- cfnet.analogWrite(0, 0, 409); //CH0 1V 
- cfnet.analogWrite(0, 1, 2047); //CH1 5V 
- delay(500); 
-} 
- 
-</code> 
- 
-[[modularfaduino:index|Modular FADUINO]] 
cfnet/cfdac2v.1771717768.txt.gz · Last modified: by 127.0.0.1