Main arduino code