🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How to use Arduino with 2 DAC(Adafruit4725) in embed

User: "Nico_21802"
Altair Community Member
Updated by Nico_21802

Hey Guys and thanks for your help. I'm a student at University of Trier (Germany) and i want to transfer this working Arduino IDE C-Code to Altair Embed. 

#include <Wire.h> #include <Adafruit_MCP4725.h>  Adafruit_MCP4725 dac,dac1;                            void setup(void) {          Serial.begin(9600);              dac.begin(0x60);       dac1.begin(0x61); }  void loop(void) {             uint16_t i=200;              dac.setVoltage(i, false);       dac1.setVoltage(i, false); }

The i variable(see above arduino ide) should be replaced with slider properties in Altair Embed for real-time
changes(does Target Interface Block work for this?)).
The problem is also that the method "setVoltage"(Arduino IDE) needs an uint16_t datatype.
The "convert to" block in embed has no uint16_t type.

My embed vsm does not work see attachments. I'm thankful for ideas.

image

Find more posts tagged with