• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoArduino-ish ProgramGPIOLinker High Power LED
Previous Next

Linker High Power LED

Posted by: Alvin Jin , February 18, 2014

[vc_row][vc_column width=”1/1″][vc_column_text]high-power-LED-300x224

This is a highlight of led modules, the full name of High Power LED, can be done in the evening you can use it in a small lamp lighting module, below me to play a simple example of the use of decorative pcduino controlled.

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][vc_tour][vc_tab title=”Hardware preparation” tab_id=”1392715030-1-65″][vc_column_text]The components used in this experiment are shown below:

The components are three Male to Female Dupont Line, one High Power LED and one pcduino.图片27-300x219

The light from the word pin shows that the lamps require a ground pin, a 5V pin, and led to an input control pin.

[/vc_column_text][/vc_tab][vc_tab title=”Wiring diagram” tab_id=”1392715030-2-99″][vc_column_text]wifi0s0-12104333671390110495853-225x300

GND pin of the pcduino is connected to GND pin, VCC pin is connected to 5V pin of the pcduino, and in pin is connected to GPIO 9 pin of the pcduino.

[/vc_column_text][/vc_tab][vc_tab title=”Test Running” tab_id=”1392716116745-2-2″][vc_column_text]Every 0.5 seconds, the LED lights for 0.5 seconds

图片28-150x150[/vc_column_text][/vc_tab][vc_tab title=”Test code” tab_id=”1392716330558-3-6″][vc_column_text]Arduino programming style control,code example, the code allows the module volume once every 0.5 seconds

int pin=9,i=0;

void setup() {

// put your setup code here, to run once:

pinMode(pin,OUTPUT);//Set the mode of gpio 9 to output

}

void loop() {

// put your main code here, to run repeatedly:

digitalWrite(pin,i++%2);//set pin9’s high and low Voltage high=1, low=0

delay(500); //Wait 500ms, led state change are displayed

}

 After the code running, every 0.5 seconds, the led lights for 0.5 seconds

[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]

Tags: GPIO

Share!
Tweet

Alvin Jin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors