Changes to arduino code and fixed syntax errors in MainScreen.js