Arduino: Reading DS18B20 interferes with servo I have an Arduino with a servo, INA219 (current and voltage sensor) and 2 DS18B20 connected to it.

DS18B20 are connected in full-power mode with 5k resistor connected between DATA line and +5V.

I use DallasTemperature library: https://github.com/milesburton/Arduino-Temperature-Control-Library

I get the temperature readings, but the problem is that my servo is jittering slightly almost every time temperature reading is done. 
If I disconnect DATA line from pin 2 (where it's normally connected) then servo is not moving anymore and everything is fine.  

Any ideas what might be causing it? I would expect servo interfering with OneWire readings, not the other way around :)

Here is the full code:
https://pastebin.com/xcES4PVT

Here is the minimal example with which I can reproduce the problem:  

    #include &lt;DallasTemperature.h&gt;
#include &lt;Servo.h&gt;

#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&amp;oneWire);

Servo myservo;

long previousMillis = 0;

long tempRequestedMillis = 0;

bool tempRequested = false;

void setup(void)
{
  // start serial port
  Serial.begin(115200);
  Serial.println("Dallas Temperature IC Control Library Demo");

  myservo.attach(9);

  // Start up the library
  sensors.begin();
  sensors.setWaitForConversion(false);
}

void loop(void)
{ 

  unsigned long currentMillis = millis();
  if (!tempRequested &amp;&amp; currentMillis - previousMillis &gt; 2000) {
    previousMillis = currentMillis;

    sensors.requestTemperatures(); // Send the command to get temperatures

    tempRequestedMillis = currentMillis;
    tempRequested = true;
  } else if (tempRequested &amp;&amp; currentMillis - tempRequestedMillis &gt; 2000) {
    Serial.println(sensors.getTempCByIndex(0));
    tempRequested = false;
  }
}
Arduino's Servo library on AVR uses interrupts; if interrupts are disabled for any amount of time, the servos will twitch.

1-Wire protocol (used by DS18B20) needs to disable interrupts for the protocol to work. Therefore, servos glitch.

There is a great explanation of the problem here: https://learn.adafruit.com/neopixels-and-servos/overview , just mentally replace "Neopixel library" with "OneWire library". Their TiCo_Servo library sounds just like what you want.