Hi there everyone,
I’m new doing classes, so me and my classmates are a bit confused.
The project consists of doing the programming of a daq shield for Arduino(we have already done the hardware).
Our problem is the following, we have to implement several functions of a class (daq) - and for starters, we don’t know how to implement analogRead to read the 8 analog channelinputs of the MCP3208 DAC. I attach the files of the library so you can see better what’s wrong on what we’re doing.
As you can see, we are trying to call the mcp3208 library from the .cpp of the daq library, and we don’t know if that’s correct. Even if we have to write an begin() each time that we create an object.
The last question that we have is how is the right way to create a object:
MCP3208 myMCP3208= MCP3208(); or MCP3208 myMCP3208;
Moreover, is it possible to create an object within a library (we’ve create a MCP3208 object within the daq library).
I don’t know if I have conveyed clear all my doubts, but I think that if someone that knows a little of programming would see quickly what are our knowledge lacks.
Thank you all, I wish you could help us.
Our brain is gonna explode, we don’t find any information about this on the internet.
Thanks a bunch!!!
daq2.h (1.2 KB)
daq2.cpp (1.54 KB)
Modificacion_implementaciones_4.ino (583 Bytes)