RSS feed

No RSS feed added

Linkerkit 5mm green led module

Linkerkit 5mm green LED module uses either a diffused or clear green LED which is mounted on a small circuit board along with current limiting resistor making it ready to plug into the Linkerkit base board and onto your Arduino or pcDuino via some ribbon cable.

Please note: LED is either diffused or clear depending on what is being used at the time for manufacture.

More details


AU$2.60 per each


4 items in stock

Add to my wishlist

Loyalty program By buying this product you can collect up to 2 loyalty points. Your cart will total 2 points that can be converted into a voucher of AU$0.04.

100 quantities 75 quantities 50 quantities 10 quantities 5 quantities
-AU$0.36 -AU$0.35 -AU$0.34 -AU$0.33 -AU$0.29

Customers who bought this product also bought...

Manufacturer: Linksprite

Description: LED module for use with the Linkerkit sheild for Arduino and pcDuino.

Sample  Arduino Code:

  Turns on an LED on for one second, then off for one second, repeatedly.
  This example code is in the public domain.
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

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

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

Example pcDuino C/C++ code to take input from switch and turn on LED

// Connect switch to pin 2 and an LED to pin 3. Press button and LED
// lights for 2 seconds and turns off.

#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>

// some defines which you can put into a .h file
#define GPIO_MODE_PATH "/sys/devices/virtual/misc/gpio/mode/"
#define GPIO_PIN_PATH "/sys/devices/virtual/misc/gpio/pin/"
#define GPIO_FILENAME "gpio"
#define HIGH '1'
#define LOW  '0'
#define INPUT  '0'
#define OUTPUT '1'
#define INPUT_PU '8'

// There are 18 IO pins, so declare file descriptors for all 18
int pinMode[18];
int pinData[18];

void writePin(int fileID, int value);

int main(void)
        char inputBuf = HIGH;
        char path[256];

        // Initialise the file descriptors for pin 2 & 3 mode and data files
        for (int i = 2; i <= 3; i++)
                memset(path,0,sizeof(path)); // clear the path variable
                // Create path for pin mode file
                sprintf(path, "%s%s%d", GPIO_MODE_PATH, GPIO_FILENAME, i);
                pinMode[i] = open(path, O_RDWR);  // set pin mode
                memset(path, 0, sizeof(path)); // clear the path variable
                // Create path for the pin data file
                sprintf(path, "%s%s%d", GPIO_PIN_PATH, GPIO_FILENAME, i);
                pinData[i] = open(path, O_RDWR); // set pin data

        writePin(pinMode[3], OUTPUT); // set as output
        writePin(pinData[3], LOW); // and write a LOW (0) to pin
        writePin(pinMode[2], INPUT_PU); // set pin 2 as input

        // Lets wait for pin 2 to go high (switch pressed)
                lseek(pinData[2], 0, SEEK_SET); // set to begining of file
                // first byte is the interesting one so read it
                read(pinData[2], &inputBuf, 1);
                usleep(100000); // 0.1sec sleep
        } while (inputBuf == HIGH);
        // set pin 3 high for 2 seconds then low again
        writePin(pinData[3], HIGH);
        // now turn pin 3 off (LOW)
        writePin(pinData[3], LOW);

void writePin(int fileID, int value)
  char buf[4];  // Need to write 4 bytes for it to work.
  memset((void *)buf, 0, sizeof(buf)); // clear the buffer out.
  sprintf(buf, "%c", value);  // create buffer to write
  lseek(fileID, 0, SEEK_SET);   // set to top of the file
  write(fileID, buf, sizeof(buf));  // and write.

No customer comments for the moment.

Only registered users can post a new comment.


No products

Shipping AU$0.00
Total AU$0.00

Check out