write() changed to writeMicroseconds() where needed