Hello All,
I just got the Adafruit MCP4725. I downloaded the library, renamed it as they said, and then added it to Documents->Arduino->libaries
When I try to upload their example sketch "triangleWave", I get the following error
fatal error: Adafruit_BusIO_Register.h: No such file or directory
#include <Adafruit_BusIO_register.h>
I do not actually see this #include in the code, so I am not sure what to do. Any help would be great. Thanks
Can't upload DAC Example Sketch
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- holdy97
- Posts: 19
- Joined: Wed Sep 28, 2022 5:45 pm
Re: Can't upload DAC Example Sketch
Hi All,
Easy fix - just download and add BusIO library. It would be good if Adafruit added this as a required library on the DAC tutorial so others will know
Easy fix - just download and add BusIO library. It would be good if Adafruit added this as a required library on the DAC tutorial so others will know
- Franklin97355
- Posts: 23940
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Can't upload DAC Example Sketch
I'll let them know.
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Can't upload DAC Example Sketch
Thanks for pointing this out. That Learn page had (very) old instructions for installing the library. Page has been updated to show installing the library using Library Manager:
https://learn.adafruit.com/mcp4725-12-b ... th-arduino
Library Manager installs dependencies at the same time, so should take care of also bringing in Adafruit BusIO:
https://github.com/adafruit/Adafruit_MC ... erties#L10
https://learn.adafruit.com/mcp4725-12-b ... th-arduino
Library Manager installs dependencies at the same time, so should take care of also bringing in Adafruit BusIO:
https://github.com/adafruit/Adafruit_MC ... erties#L10
- holdy97
- Posts: 19
- Joined: Wed Sep 28, 2022 5:45 pm
Re: Can't upload DAC Example Sketch
No problem. There is one more thing I'll bring up here.
I am using the DAC for a feedback controller I am working on. The arduino calculates the control input, and the DAC then gives the appropriate analog signal.
The controller is working well (the output tracks the reference), but if you look at the upper right figure, the analog signal from the DAC seems to not perfectly match the calculated input that the arduino is telling it to give.
I am using analogin on the arduino to read the DAC output. Would it be the analogread that is in error?
I am using the DAC for a feedback controller I am working on. The arduino calculates the control input, and the DAC then gives the appropriate analog signal.
The controller is working well (the output tracks the reference), but if you look at the upper right figure, the analog signal from the DAC seems to not perfectly match the calculated input that the arduino is telling it to give.
I am using analogin on the arduino to read the DAC output. Would it be the analogread that is in error?
- Attachments
-
- fig.png (67.5 KiB) Viewed 101 times
Please be positive and constructive with your questions and comments.