Skip to content

Nova LED

Blue edited this page Feb 16, 2016 · 3 revisions

板子上并没有焊接LED灯,只留出了接口,可以根据自己的需要,按照板子上标出的极性,直接插上LED即可。Led的引脚一般是长正短负,如果引脚被剪过,灯帽上有缺口的为负极,插反LED不会点亮,也不会烧坏。

结构尺寸:

可用端口: A0、A1、A2、A3、S0、S1、S2、S3

示例代码

以S0口为例Arduino IDE下的代码:

/*
Nova_Led

Turns on an LED on for one second, then off for one second, repeatedly.

Created 15 Dec 2015
By Blue

https://github.com/StarLabMakerSpace/Nova/wiki
*/


#include <Nova.h>

LED led = LED(S0);  // A0、A1、A2、A3、S0、S1、S2、S3 

void setup() 
{

}

void loop() 
{
   // turn the LED on
   led.on(); 

  // wait for a second
  delay(1000);

  // turn the LED off
  led.off();

  // wait for a second
  delay(1000);
}

Clone this wiki locally