Difference between revisions of "LinkNode 5mm Red LED Module"

From LinkSprite Playgound
Jump to: navigation, search
(Created page with "== Introduction == This is a 5mm LED, It used as pilot lamp for power or signal. Its brightness can be adjust by potentiometer. It’s used as pilot lamp for power or signal...")
 
(No difference)

Latest revision as of 02:30, 13 December 2016

Introduction

This is a 5mm LED, It used as pilot lamp for power or signal. Its brightness can be adjust by potentiometer. It’s used as pilot lamp for power or signal and brightness can be adjust by potentiometer.

STM32 A-15.jpg

STM32 A-2.jpg

STM32 A-12.jpg

STM32 A-13.jpg

Wiring & Running

The LED module is connected to the base shield J1:

LED Signal --> LinkNode D1 G0

Led Red 5mm.png

Simple Code

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
 */
 
void setup() {                
  // initialize the digital pin as an output.
  pinMode(0, OUTPUT);     
}
 
void loop() {
  digitalWrite(0, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(0, LOW);    // set the LED off
  delay(1000);              // wait for a second
}