Cleaner implementation of PC side software (not working though). Added
time delay buffer