Phone: +86-20-8520 1025       Email: SALES@FRIENDLYARM.COM / techsupport@friendlyarm.com Forum    Wiki

  • Shopping Cart
  • Login
  • Register
  • CPU Module
  • Mini Board
    • Cortex-A9(Quad-Core)
    • Cortex-A8
    • ARM11
    • ARM9
  • NanoPC & NanoPi
  • Hats & Docks
  • Enclosure & Holder
    • 3D Printed
    • Acrylic
    • Metal
    • Plastic
  • Matrix Accessories
    • Actuator
    • Camera
    • Communication
    • Display
    • GPS
    • Heat Sink
    • Power
    • Sensor
    • Serial Comm Board
    • SSD/MicroSD
    • Others
  • BakeBit Sensors/Modules
  • LCD Module
  • Value Pack & Kit
FriendlyElec

Login | Register

  • Home
  • Downloads
  • Forum
  • Wiki
  • Information
    • About Us
    • Privacy Policy
    • Terms & Conditions
  • Distributor
  • FreeBoard
  • Matrix Accessories
  • LED LED-01
LED LED-01 LED LED-01 LED LED-01 LED LED-01
LED LED-01

LED LED-01

0 reviews / Write a review
  • $99,999.00
(USD)
Buyer responsible for payment of duty.
  • Availability: Out Of Stock

  • Brand: FriendlyElec
  • Product Code: LED-01


  • Description
  • Reviews (0)

1 Introduction

On this module we put a 5mm LED and extend all pins to a 3-Pin 2.54mm spacing pin header. Pin V is power, G is grounded and S is data which is connected to a triode to turn the LED on or off. You can write high or low, or PWN signals(3.3V or 5V) to S. When you write high to S the LED will turn on and become brightest. When you write low to S the LED will turn off. If you write PWM signals to S the LED's brightness will vary depending on the PWM's signal variances. We provide red, green and white LED modules.

2 Features

  • GPIO/PWM interface, 3.3/5V, PWM brightness control
  • Tiny, easy to be used in various situations
  • 2.54mm spacing pin

3 How To

  • Connect to Tiny4412 SDK (1506)

    Connect the module's pin S to GPIO PIN1, V to 5V and G grounded

Code Sample in C Under Linux

#include <stdio.h>#include <unistd.h>#include "libfahw.h" #define LED_BLINK_TIMES     10
 int main(int argc, char ** argv)
{
int ledPin = TINY4412_GPIO_PIN1;
int i = 0;
int ret = -1;
  if ((ret = exportGPIOPin(ledPin)) == -
1) {
printf("exportGPIOPin(%d) failed ", ledPin);
}
if ((ret = setGPIODirection(ledPin, GPIO_OUT)) == -1) {
printf("setGPIODirection(%d) failed ", ledPin);
}
  for (i = 0; i < LED_BLINK_TIMES; i++)
{
if (i % 2) {
ret = setGPIOValue(ledPin, GPIO_HIGH);
} else {
ret = setGPIOValue(ledPin, GPIO_LOW);
}
if (ret == -1) {
printf("setGPIOValue(%d) failed ", ledPin);
}
printf("LED blinking times %d ", i);
sleep(1);
}
unexportGPIOPin(ledPin);
return 0;
}


Compile and Run

git clone http://github.com/friendlyarm/fa-hardware.git
cd fa-hardware
cd demo
cd matrix-led
make

Copy your compiled bin to your board and you are ready to go.

Resources


Write a review

Write a review

Note: HTML is not translated!
    Bad           Good
Recently viewed
LED LED-01

LED LED-01

1 Introduction On this module we put a 5mm LED and extend all pins to a 3-Pin 2.54mm spacing pin .....

$99,999.00


Power & Source of Big Ideas

Follow us
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Newsletter

New in alerts - Sign up to our Newsletter.

Contact Us
  • Room 118,Building A, Shilian Technology Park, No.33 Science Road,Science City,Luogang District, Guangzhou,GuangDong China
  • +86-20-8520 1025
  • sales@friendlyarm.com
  • techsupport@friendlyarm.com
Information
  • About Us
  • Downloads
  • Privacy Policy
  • Terms&Conditions
  • Distributor
  • FreeBoard
Customer Service
  • Contact Us
  • Returns
  • Site Map
My Account
  • My Account
  • Order History
  • Wish List
  • Newsletter


Copyright © 2008-2025 friendlyelec.com All rights reserved.
Top
Categories
  • CPU Module (15)
  • Mini Board (3)
  • NanoPC & NanoPi (35)
  • Hats & Docks (12)
  • Enclosure & Holder (16)
  • BakeBit Sensors/Modules (2)
  • Matrix Accessories (74)
    • Actuator (8)
    • Camera (6)
    • Communication (7)
    • Display (5)
    • GPS (0)
    • Heat Sink (8)
    • Power (6)
    • Sensor (12)
    • Serial Comm Board (1)
    • SSD/MicroSD (9)
    • Others (11)
  • LCD Module (16)
  • Value Pack & Kit (11)