Arduino code for an FTL controller