LED

Overview

This tutorial will teach you how to implement a blinking LED with the Smorgasboard.

Components

Arduino + power and usb connectors
Museduino Shield
Museduino Smorgasboard
CAT5/RJ45 cable
LED
Female/Female Jumpers

20150604_120952

led tutorial

Setup

Connect the Museduino Shield to the Arduino header pins.

Arduino + Museduino

Connect the Smorgasboard satellite to port A on the Museduino Shield via CAT5/RJ45 cable.

20150604_120801

Connect the anode and cathode of the LED to Female/Female jumpers.

led tutorial

Pictured above are blue (-) and white (+) jumpers. In order to connect the other ends of the jumpers to the satellite, you will need to determine which I/O are available from port A on the Museduino shield.

2.0_pinchart

Each version of Museduino has its own pinout chart. Use the pinout chart to find Arduino digital pin 6. After reviewing, you will find that Digital pin 6 is signal pin 5 on the Smorgasboard satellite. Each Satellite I/O has a 4 pin configuration. Locate pin 1 for I/O 5 (circled number) with the labeled solder mask.

20150604_121056

Once you’ve found the correct pin, you can review the pin configuration chart:
1 is Power, 2 is the signal pin with resistor in series, 3 is direct signal pin, and 4 is ground.

pinconfig

Next, connect the other ends of the jumpers via header pins. Use pin 4 for ground and pin 3 for the signal pin (digital pin 6).

20150604_120902

Code


/*
  Museduino | LED Tutorial
  Turns on LED for one second, then off for one second, repeatedly.
*/
 
// Digital Pin 6 on Satellite Pin 5 via Port A
int s5A = 6;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pin as an output.
  pinMode(s5A, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(s5A, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(s5A, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

Github

After uploading the code to your Arduino, you will have a blinking LED.

20150604_130131

Want to add a button? Go to the next tutorial.

NEXT

Advertisements