obniz Parts Library

M5StickC_DAC

GitHub
M5StickC_DAC
Usable Devices :
obniz_board
m5stickc
Found at :
秋月電子通商

M5StickC_DAC

The DA Converter for M5StickC. It makes the potential difference between + and -.

https://m5stack.com/products/m5stickc-dac-hat-mcp4725

wired(obniz, {[scl, sda, vcc, gnd, i2c]})

connect to the obniz Board.
When using M5StickC, You do not need to assign pins.

// JavaScript Examples
var dac = obniz.wired("M5StickC_DAC", {sda:0, scl:26});
dac.setVoltage(1.5);

When using other devices, assign vcc and gnd as appropriate pins.

name type required default description
vcc number(obniz Board io) no   Power Supply
gnd number(obniz Board io) no   Power Supply
scl number(obniz Board io) no   scl of I2C
sda number(obniz Board io) no   sda of I2C
i2c object no   obniz i2c object
// JavaScript Examples
var dac = obniz.wired("M5StickC_DAC", {sda:0, scl:26});
dac.setVoltage(1.5);

setVoltage(voltage)

make the potential difference.
specify a value between 0 and 3.3(V).

// JavaScript Examples
var dac = obniz.wired("M5StickC_DAC", {sda:0, scl:26});
dac.setVoltage(1.5);

Supported from: obniz.js 3.5.0