Anton Nazarenko
Published

MKR1000 Unboxing and Testing (7 Steps)

The first run and the first troubles with the Arduino MKR 1000. FAQ.

IntermediateProtip6 minutes6,722
MKR1000 Unboxing and Testing (7 Steps)

Things used in this project

Hardware components

Arduino MKR1000
Arduino MKR1000
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

Blink MKR1000

Arduino
It uses to define the onboard LED's port
int _ledPin = 0;
void setup() 
{
  // setting up all IO ports as OUTPUT pins
  for(int i=0; i<=14; i++)  
    pinMode(i,OUTPUT);  
}

// method to blink 
void _blink(int port){
  for(int i=0; i<port; i++)
  {
     digitalWrite(port, HIGH);
     delay(300);
     digitalWrite(port, LOW);
     delay(200);
  }
}

void loop() {
  // The number of blinks is equals to the LED's port number
  _blink(_ledPin);
  if(++_ledPin>14)
    _ledPin=0;  
}

Credits

Anton Nazarenko

Anton Nazarenko

4 projects • 13 followers

Comments