From 583c3983ca6fb77816c84eb3696d46e740e4348d Mon Sep 17 00:00:00 2001 From: Algaras <145165373+Algaras-dev@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:29:19 +0100 Subject: [PATCH 1/2] Move Wire and Serial initialization to setup() --- examples/Example3_BulbReadings/Example3_BulbReadings.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Example3_BulbReadings/Example3_BulbReadings.ino b/examples/Example3_BulbReadings/Example3_BulbReadings.ino index aa79ecb..9754dc7 100644 --- a/examples/Example3_BulbReadings/Example3_BulbReadings.ino +++ b/examples/Example3_BulbReadings/Example3_BulbReadings.ino @@ -27,13 +27,13 @@ byte GAIN = 2; byte MEASUREMENT_MODE = 0; void setup() { + Wire.begin(); + Serial.begin(115200); + sensor.begin(Wire, GAIN, MEASUREMENT_MODE); } void loop() { - Wire.begin(); - Serial.begin(115200); - sensor.takeMeasurementsWithBulb(); if (sensor.getVersion() == SENSORTYPE_AS7262) From 5185314f9432f570232b02ae31ff8833fc4f026e Mon Sep 17 00:00:00 2001 From: Algaras <145165373+Algaras-dev@users.noreply.github.com> Date: Thu, 7 Nov 2024 14:32:53 +0100 Subject: [PATCH 2/2] Add missing Serial.println() --- examples/Example3_BulbReadings/Example3_BulbReadings.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/Example3_BulbReadings/Example3_BulbReadings.ino b/examples/Example3_BulbReadings/Example3_BulbReadings.ino index 9754dc7..4228753 100644 --- a/examples/Example3_BulbReadings/Example3_BulbReadings.ino +++ b/examples/Example3_BulbReadings/Example3_BulbReadings.ino @@ -72,4 +72,6 @@ void loop() { Serial.print("] tempF["); Serial.print(sensor.getTemperatureF(), 1); Serial.print("]"); + + Serial.println(); } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy