Final Working Arduino Code