source: rtos_arduino/trunk/examples/CompositeExample/Adafruit_VCNL4000/examples/vcnl4010test/vcnl4010test.ino@ 137

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

サンプルの追加.

File size: 439 bytes
Line 
1#include <Wire.h>
2#include "Adafruit_VCNL4010.h"
3
4Adafruit_VCNL4010 vcnl;
5
6void setup() {
7 Serial.begin(9600);
8 Serial.println("VCNL4010 test");
9
10 if (! vcnl.begin()){
11 Serial.println("Sensor not found :(");
12 while (1);
13 }
14 Serial.println("Found VCNL4010");
15}
16
17
18void loop() {
19 Serial.print("Ambient: "); Serial.println(vcnl.readAmbient());
20 Serial.print("Proimity: "); Serial.println(vcnl.readProximity());
21 delay(100);
22}
Note: See TracBrowser for help on using the repository browser.