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 5 years have passed since last update.

Groveの光センサをNefryで使うメモ #nefry #dotstudio

Posted at

タイトル通りGroveの光センサをNefryで使うメモです。

Seeedのサイトはこちら

light.ino
#include <Nefry.h>

int sensorValue;

void setup() {
  Nefry.print("Grove Light sensor SETUP");
  Nefry.setLed(0,0,0);
}

void loop() {
  sensorValue = analogRead(A0);
  Nefry.print("sensor = " );
  Nefry.println(sensorValue);
  delay(1000);
}

setup()内でNefry.setLed(0,0,0)を指定していますが、ここでは NefryのLEDを消灯させています。

照度センサを使うときには閾値がおかしくなってしまうので大抵の場合はLEDは消しておいた方が良いでしょう。

LEDつけっばなしで閾値がうまくない例↑

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?