title: Unable to update shift register with NodeMCU
body: <p>I am working on a project where I need 9 7-segment displays. I use 9 shift registers for this.</p>
  
  <p>I tested the shift registers with an Arduino Nano and everything worked. I then copied/edited the code over for use in a NodeMCU (ESP8266 wifi board) and for some reason the function to write to shift registers seems to be broken.</p>
  
  <p>This is the code now:</p>
  
  <pre><code>void writeBytes(uint8_t bytesToWrite[]){
    Serial.println("test!!!");
    //Run through the 9 bytes in bytes to write.
    for(int q = 0; q &lt; 9; q++) {
      //Loop through the 8 bits.
      for(int i =0; i &lt; 8; i++) {
        //Check if the msb = 1
        if(0x80 &amp; bytesToWrite[q]) {
          digitalWrite(dataPin, HIGH);
          delay(delayTime);
          digitalWrite(clockPin, HIGH);
          delay(delayTime);
          digitalWrite(clockPin, LOW);
          delay(delayTime);
          digitalWrite(dataPin, LOW);
          delay(delayTime);
        } else {
          digitalWrite(clockPin, HIGH);
          delay(delayTime);
          digitalWrite(clockPin, LOW);
          delay(delayTime);
        }
        //Shift all the bits one up.
        bytesToWrite[q] = bytesToWrite[q] &lt;&lt; 1;
      }
    }
    //Turn on the out pin, so it will output.
    digitalWrite(outPin, HIGH);
    delay(delayTime);;
    digitalWrite(outPin, LOW);
    delay(delayTime);
  }
  </code></pre>
  
  <p>I have checked if I used the right pins and checked if if those pins actually turned on. I also checked if the function would get executed and would be passed the right variables and it does. </p>
  
  <p>This same function works on an Arduino Nano. But it won't work on a NodeMCU. The NodeMCU has a higher clock frequency. So I tried adding delays in. But it didn't work.</p>