source: rtos_arduino/trunk/examples/MultiTaskText/LEDBlink_CLEDBlink/rca_app.cpp@ 247

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

テキストの見直しに伴うプログラムの変更

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