Skip to content

Commit e31eb10

Browse files
authored
Move sensors.begin() from void setup() to void before()
Dallas temperature sensors are not presented since commit (934ccf30b205afad2086c908a367c4205ce580cd)
1 parent ce4d17f commit e31eb10

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

examples/DallasTemperatureSensor/DallasTemperatureSensor.ino

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,14 @@ bool metric = true;
5151
// Initialize temperature message
5252
MyMessage msg(0,V_TEMP);
5353

54-
void setup()
55-
{
54+
void before()
55+
{
5656
// Startup up the OneWire library
5757
sensors.begin();
58+
}
59+
60+
void setup()
61+
{
5862
// requestTemperatures() will not block current thread
5963
sensors.setWaitForConversion(false);
6064
}

0 commit comments

Comments
 (0)