source: rtos_arduino/trunk/examples/MultiTaskText/LEDBlink_CLEDBlink/r2ca_app.cpp@ 260

Last change on this file since 260 was 260, checked in by ertl-honda, 8 years ago

マクロ名を更新.
実行モデルを変更.

File size: 489 bytes
Line 
1#include "r2ca.h"
2
3#include <ChainableLED.h>
4
5#define LED_PIN 4
6
7#define NUM_LEDS 1
8ChainableLED leds(8, 9, NUM_LEDS);
9
10void setup() {
11 pinMode(LED_PIN, OUTPUT);
12
13 leds.init();
14}
15
16void loop() {
17 digitalWrite(LED_PIN, HIGH);
18 delay(1000);
19 digitalWrite(LED_PIN, LOW);
20 delay(1000);
21}
22
23void loop1() {
24 int i;
25 leds.setColorRGB(0, 250, 0, 0);
26 delay(250);
27
28 leds.setColorRGB(0, 0, 250, 0);
29 delay(250);
30
31 leds.setColorRGB(0, 0, 0, 250);
32 delay(250);
33}
Note: See TracBrowser for help on using the repository browser.