Refactoring weightRead.ino