1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Grove IoT スターターキット for SORACOM の使い方

Last updated at Posted at 2021-08-04

「Grove IoT スターターキット for SORACOM」の最初の使い方として、基盤についている LED を点灯させてみました。

led_test/led_test.ino
// ---------------------------------------------------------------
/*
	led_test.ino

					Aug/04/2021
*/
// ---------------------------------------------------------------
 
#include <WioLTEforArduino.h>

WioLTE Wio;

void setup() {
	delay(1000);

	SerialUSB.println("");
	SerialUSB.println("*** START ***");  
	SerialUSB.println("### I/O Initialize.");
	Wio.Init();
	delay(1000);
	SerialUSB.println("### Setup completed.");
	SerialUSB.println("");
}

// ---------------------------------------------------------------
void loop() {
	led_delay_proc(0,0,1,1000,"blue");
	led_delay_proc(0,1,0,1000,"lime");
	led_delay_proc(1,0,0,1000,"red"); 
	led_delay_proc(1,1,0,1000,"yellow");    
	led_delay_proc(0,1,1,1000,"cyan");
	led_delay_proc(0,0,0,2000,"black"); 
	SerialUSB.println("");
}

// ---------------------------------------------------------------
void led_delay_proc(int rr,int gg,int bb,int msec,String mesg){
	Wio.LedSetRGB(rr, gg, bb);
	SerialUSB.println("*** "+ mesg + " ***");
	delay(msec);
}

// ---------------------------------------------------------------

Arduino IDE の様子
arduino_ide_aa.png

マイコンボードに書き込んで、実行させます。
LED が点灯し、シリアルモニタに次の表示が出ます。
wiolte_aa.png

実行時の様子
wiolte_aa.jpg

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?