Skip to content

Move sensors.begin from void setup to void before #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Move sensors.begin() from void setup() to void before()
Dallas temperature sensors are not presented since commit (934ccf30b205afad2086c908a367c4205ce580cd)
  • Loading branch information
dmacias72 authored Aug 11, 2016
commit e31eb10311be071d376d55d0e23133b611a565ef
8 changes: 6 additions & 2 deletions examples/DallasTemperatureSensor/DallasTemperatureSensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ bool metric = true;
// Initialize temperature message
MyMessage msg(0,V_TEMP);

void setup()
{
void before()
{
// Startup up the OneWire library
sensors.begin();
}

void setup()
{
// requestTemperatures() will not block current thread
sensors.setWaitForConversion(false);
}
Expand Down