Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error making an example. #1

Open
renatoianhez opened this issue Dec 10, 2017 · 0 comments
Open

Error making an example. #1

renatoianhez opened this issue Dec 10, 2017 · 0 comments

Comments

@renatoianhez
Copy link

I tried to write a small example, to use on my DAC8552 (similar to 8554, with 2 channels). There seems to be an error in library implementation that I could not resolve. Here's my code:
`#include <DAC8554.h>

DAC8554 dac = DAC8554(true);
dac.setDAC(0);
dac.setPins(13, 2, 11, 7, 6, 5, 8);
dac.initializePins();

int canal1;
int canal2;

void setup() {

}

void loop() {
dac.updateChannel(0, 65535);
dac.updateChannel(1, 32768);
canal1 = analogRead(0);
canal2 = analogRead(1);
Serial.print(canal1);
Serial.print("\t");
Serial.println(canal2);
}`

The Arduino IDE replied: "'dac' does not name a type"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant