- Mon Dec 21, 2015 9:24 am
#186712
I just received my "SparkFun SAMD21 Mini Breakout" and found that bit does not function properly with analogWrite.
If you select **SparkFun SAMD21 Dev Breakout** in the Arduino IDE instead, it works fine. I wonder if they loaded the wrong firmware in the mini? I am not sure why it's firmware would be different. There is not much going on on these breakout boards.
Try this with each board selection (dev breakout and mini breakout):
Jim
If you select **SparkFun SAMD21 Dev Breakout** in the Arduino IDE instead, it works fine. I wonder if they loaded the wrong firmware in the mini? I am not sure why it's firmware would be different. There is not much going on on these breakout boards.
Try this with each board selection (dev breakout and mini breakout):
Code: Select all
Thanks,/*
LEDRamp SAMD21 TEST
James Lanier
*/
int LED13=13;int LED10=10;
void setup()
{
analogWriteResolution(10) ; //10bit=1023max,12bit=4095max
}
void loop()
{
for(int val=1023;val>0;val--)
{
analogWrite(LED13, val/10); // Limit Range(drives gate of FET for LED)
analogWrite(LED10, val); // Full Range
delay(2);
}
delay(50);
for(int val=0;val<1024;val++)
{
analogWrite(LED13, val/10); // Limit Range(drives gate of FET for LED)
analogWrite(LED10, val); // Full Range
delay(2);
}
delay(50);
}
Jim