mcanet / knitic

The open hardware knitting machine (at the moment based in electronic Brother knitting machines)
GNU General Public License v3.0
212 stars 57 forks source link

Fixed slight flickering of output solenoids #14

Closed thiagohersan closed 12 years ago

thiagohersan commented 12 years ago

I suspect the shift clock was happening too soon after the data change, so I added a small delay.

  `//Sets the pin to HIGH or LOW depending on pinState
  digitalWrite(myDataPin, pinState);
  // hold data for 1ms before clocking it in
  delay(1);
  //register shifts bits on upstroke of clock pin  
  digitalWrite(myClockPin, 1);`