Hello Everyone,
I was hoping to solicit some help with understanding the Mkr Zero board a little better. I've tried extensive searches and have come up with fairly little information on the Mkr Zero. Mostly what I'm interested in is wiring help. So here are the questions I have regarding the Mkr Zero and I sincerely apologize if they are illustrated in a tutorial or information page, I have just been searching for awhile and have not come up with concrete answers. Also I'm pretty new to microconcrollers and so have a hard time deciphering the schematics of the mkr Zero posted on the site.
So here are my questions:
What options do I have for powering the mkr zero? I see that a 3.7V lipo battery is recommended but as I will be powering the rest of the project with a solar recharged 12V system, I was thinking of using a buck converter to drop it to acceptable voltage and power the mkr Zero that way. Is 5V wired to the VIN pin what is called for? Are any current regulators needed with a large Ah battery bank?
How do I wire up that AREF pin and is it the default? I've tried using the analogReference(EXTERNAL) command and it throws errors
Arduino: 1.8.1 (Mac OS X), Board: "Arduino MKRZero"
/Users/matthart/Documents/Arduino/experiment_with_aref/experiment_with_aref.ino: In function 'void setup()':
experiment_with_aref:3: error: invalid conversion from 'int' to 'eAnalogReference {aka _eAnalogReference}' [-fpermissive]
analogReference(EXTERNAL)
^
In file included from /Users/matthart/Library/Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/Arduino.h:91:0,
from sketch/experiment_with_aref.ino.cpp:1:
/Users/matthart/Library/Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/wiring_analog.h:47:13: error: initializing argument 1 of 'void analogReference(eAnalogReference)' [-fpermissive]
extern void analogReference( eAnalogReference ulMode ) ;
^
experiment_with_aref:4: error: expected ';' before '}' token
}
^
exit status 1
invalid conversion from 'int' to 'eAnalogReference {aka _eAnalogReference}' [-fpermissive]
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
.
Upon searching for this I found a forum thread that didn't help me understand the problem very well.
Also in regard to AREF I found this resource which recommends a technique for getting a more accurate reference voltage: Precise voltage measurement with an Arduino microcontroller
Yet after reading that page I am unsure of how to wire a MCP1525 to the AREF pin or for that matter if its even necessary, as he is using an UNO and I'm using a mkr Zero. For example, did they make it so the Arduino uses a more accurate internal voltage reference?
Also here is the code that generated that error, it was simply an experiment and so is very basic
void setup() {
// put your setup code here, to run once:
analogReference(EXTERNAL)
}
void loop() {
// put your main code here, to run repeatedly:
}
As for my project in particular, I really don't have any wiring diagrams or anything of that sort because I simply don't know how I should wire it yet, hence your help. Just let me know if I can provide any other information that could help you help me.
Thanks again for any help and sorry if this stuff is basic or is the same as other boards, I'm just unsure as it seems like all the boards are different in regards to wiring and I have found little information that is specific to the mkr Zero
Edit: Actually I think he's using the ATMEGA chip not the UNO (Precise voltage measurement with an Arduino microcontroller)