Hi just to say got a MCP4725 - DAC working (thanks to some Python code form johnwhittington) on the Pico. I'm using Sparkfun module but Ada Fruit do one too. https://www.sparkfun.com/products/12918?_ga=1.22340158.462334063.1427963564
var voltage = 4095; var dac = [2]; voltage = (voltage > 4095) ? 4095 : voltage; // MCP4725 expects a 12bit data stream in two bytes (2nd & 3rd of transmission) dac[0] = (voltage >> 8) & 0xFF; // [0 0 0 0 D12 D11 D10 D9 D8] (first bits are modes for our use 0 is fine) dac[1] = voltage & 0xFF; // [D7 D6 D5 D4 D3 D2 D1 D0] I2C1.setup({scl:b6, sda:b7, bitrate:100000}); I2C1.writeTo(0x60,[dac[0],dac[1]]);
@LawrenceGrif started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi just to say got a MCP4725 - DAC working (thanks to some Python code form johnwhittington) on the Pico. I'm using Sparkfun module but Ada Fruit do one too.
https://www.sparkfun.com/products/12918?_ga=1.22340158.462334063.1427963564