You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So scan mode requieres two additional pins, pinIQR for the conversion interrupt flag and pinMCLK (which is not implemented at all).
26
27
27
-
Both constructors fall back to default definitions which are common in the Arduino world. So if nothing else is explicit specified the default SPI pinout will be used. But to run in Scan Mode it is mandatory to give one interruptcapable pin as well as one PWM pin (altough MCLK functions are not implemented).
28
+
Both constructors fall back to default definitions which are common in the Arduino world. So if no pins is explicit specified the default SPI pinout will be used. Therefor it boils down to something simple as `MCP3561 mcp(2, 3, 10);` or even `MCP3561 mcp(10);`.
28
29
29
-
For initialization of the ADC you must run once:
30
-
```
31
-
if (!mcp.begin()) {
32
-
// failed to initialize
33
-
while (1)
34
-
;
35
-
}
36
-
```
37
-
After that you could simple do ```int32_t adcdata0 = mcp.analogRead(0);``` to get a value of the single ended channel0.
30
+
Please take a look at the examples how to configure these different modes.
0 commit comments