feat: 全量同步 254 个常用的 Arduino 扩展库文件
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include <Wire.h>
|
||||
#include <MAX44009.h>
|
||||
|
||||
MAX44009 light;
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
Wire.begin();
|
||||
|
||||
delay(500);
|
||||
|
||||
if(light.begin())
|
||||
{
|
||||
Serial.println("Could not find a valid MAX44009 sensor, check wiring!");
|
||||
while(1);
|
||||
}
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
Serial.print("Light (lux): ");
|
||||
Serial.println(light.get_lux());
|
||||
delay(1000);
|
||||
}
|
||||
Reference in New Issue
Block a user