Error Message compiling

Hello and thanks in advance for any help I am new to all of this so please bear with me.

Im trying to upload a code on to a mega board but not sure how to post the code properly. also I think it may be too big to post but not sure.

anyways here is the error message that im getting...

ino:41:31: error: expected primary-expression before ')' token

Error compiling.

if I understand thigs right im missing something probably a '(' somewhere but how to I go about tracking this down? thanks again for help

jlyman28:
ino:41:31: error: expected primary-expression before ')' token

Line 41, 31st space. There's where he expected a )

ok thanks, now is that the 41st line total or is only counting uncommented lines?

Here is the beginning of the code that should include line 41 either way

///Code written by Steve Heitman
///based off original code written by:
///Nick Devan - Touch screen navagation code https://code.google.com/p/reef-aquarium-controller/downloads/detail?name=New%20Life%20Reef%20Controller%20Gerber_Cam%20Files.zip&can=1&q=
///benjaf @ theplantedtank - Sunrise/Sunset code http://www.plantedtank.net/forums/showthread.php?t=213234
///NightattheOpera @ Nano-reef.com - Lunar Phase Code http://www.nano-reef.com/topic/217305-a-lunar-phase-function-for-the-arduino/
// Jarduino Aquarium Controller v.1.1 //     http://www.ultimatereef.net/forums/member.php?u=44387 // http://www.reefcentral.co.uk/member.php/13262-TheDOdblG


//#################    REVISION 7.0 - Updated 10/5/14


//   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//   THE SOFTWARE.

//   You may modify and/or use it under the terms of the GNU General Public License as
//   published by the Free Software Foundation version 3 of the License, or (at your option) any later
//   version.  However if you intend on using the program (either in its entirety or any
//   part of it) in any way, shape, or form for PROFIT, you MUST contact me and obtain
//   my EXPRESS WRITTEN CONSENT (contact information is provided above).
//   VIOLATORS WILL BE PROSECUTED TO THE FULLEST EXTENT OF THE LAW.

//*******Included Libraries*******//
#include <UTouch.h>
#include <avr/pgmspace.h>
#include <UTFT.h>
#include <tinyFAT.h>
#include <UTFT_tinyFAT.h>
#include <EEPROM.h>
#include <RTClib.h>
#include <Wire.h>
#include <OneWire.h>
#include <DallasTemperature.h>

//********    Declare Touch/LCD/RTC    **********
UTFT  myGLCD(ITDB50, 38, 39, 40, 41);   //sets LCD pins - change to your screen pin-out and aspect
UTouch  myTouch(6, 5, 4, 3, 2,);        //sets touch pins - change to your set up (default is usually 6,5,4,3,2)
UTFT_tinyFAT myFiles(&myGLCD);
RTC_DS1307 RTC;


//********   Call Fonts    **********
extern uint8_t arial_bold[];
extern uint8_t Sinclair_S[];
extern uint8_t SevenSegmentFull[];

//*******   Declare 1-Wire for TEMP sensors  ********
#define ONE_WIRE_BUS 2               //sets sensor to pwm pin 2 - Change to your setup

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature tempsensors(&oneWire);

//DS18B20 sensor address' ******change these for your sensors*******
//link provided is a good sketch to get yours
//http://www.hacktronics.com/Tutorials/arduino-1-wire-address-finder.html
//I added this link because I found this to be a much easier sketch to use than the Dallas Multiple Example when
//trying to find Address'on a 1 wire bus.

DeviceAddress tankTemp = { 0x28, 0x09, 0xD3, 0x07, 0x04, 0x00, 0x00, 0x80 };
DeviceAddress sumpTemp = { 0x28, 0x48, 0x31, 0x2C, 0x04, 0x00, 0x00, 0x7F };
DeviceAddress rSinkTemp = {0x28, 0x00, 0x2D, 0x47, 0x04, 0x00, 0x00, 0xF2 };
DeviceAddress lSinkTemp = {0x28, 0x35, 0xF7, 0x2A, 0x04, 0x00, 0x00, 0x1A };

float TANK;
float SUMP;
float SINK1;
float SINK2;

//########################################################################################################
//###########################################      $Global Varibles      #############################[#VAR]
//########################################################################################################

//******************pH Variables*****************

float pH_read;
float pH_val;

//###   Touch Screen Varibles  ########################
int x, y;

//###   Screen Select Pointers  #######################

boolean home_screen = true;
boolean menu_screen = false;
boolean ledhome_screen = false;
boolean ledchannel_screen = false;
boolean ledevents_screen = false;
boolean clock_screen = false;
boolean tempgraph_screen = false;
boolean temphome_screen = false;
boolean ph_screen = false;
boolean settings_screen = false;
boolean outlet_screen = false;
boolean reminders_screen = false;
boolean weather_screen = false;
boolean timers_screen = false;
boolean calendar_screen = false;
boolean dosingato_screen = false;
boolean Enter_new_value = false;
boolean Enter_new_time = false;
boolean outlet_status = false;
boolean change_sunrise = false;
boolean change_moonmax = false;
boolean Enter_moon_value = false;
boolean feeding_popup = false;
boolean feedingtimer = false;
boolean showcountdown = false;
boolean feedingstatus = false;
boolean feedingcancel = false;
boolean pumpcalibration = false;
boolean Enter_new_dose = false;
boolean ledschedule = false;
boolean ledoff = false;
boolean lock_popup = false;

//###   Clock Varibles ################################

int Hours, Minutes, Seconds;
int Day;
int Month;
int Year;
int Weekday;
String Current_time;
boolean Daytime = true;
boolean Was_day;


//####Outlet Variables #########################

int OUTLETS[8] = {A8, A9, A10, A11, A12, A13, A14, A15};
int outletState = 0;

///### LED Variables ############################

const int Wht_Ch1 = 6;      //sets pwm pins for LED driver
const int RBlue_Ch1 = 7;
const int Blue_Ch1 = 8;
const int Wht_Ch2 = 9;
const int Blue_Ch2 = 11;
const int Wht_Ch3 = 12;
const int RBlue_Ch2 = 10;
const int UV_Ch1 = 13;      // Pin 13 also being used for Moon Lighting
//change pins to your set-up if conflict
//#######Weather Strings###############

String Current_weather = "Sunny!";  //default strings...programs unfinished
String Coral_Accl = "off";

//###   Led Varibles ##################################
int White_max = 0;               //Dimming variables
int Blue_max = 0;
int RBlue_max = 0;
int UV_max = 0;
int change_max_bright = 0;


int Blue_Led_Brightness = 0;    //Print LEDs % variables
int RBlue_Led_Brightness = 0;
int White_Led_Brightness = 0;
int UV_Led_Brightness = 0;

//###   Led Schedule Varibles ##################################
int LEDmanual = 0;
int SunTwelve = 0;
int SunEight = 0;
int MoonStandard = 0;
int MoonReef = 0;

//EEPROM storage variables (address')
int whtsun = 0;                 //LEDs Max Bright
int rblsun = 1;
int blusun = 2;
int uvsun = 3;
int savesunhour = 4;            //Sunrise Start time
int savesunmin = 5;
int savemoon = 6;               //Moon Max Bright
int ledmanual = 7;              //Sun Schedule Select
int suntwelve = 8;
int suneight = 9;
int moonstandard = 10;          //Moon Schedule Select
int moonreef = 11;

[code]

but I don't see anywere there should be a ')'

jlyman28:
UTouch myTouch(6, 5, 4, 3, 2,); //sets touch pins - change to your set up (default is usually

Here.

You’re either missing a value before the “)” or you have an extra comma.

:slight_smile:

ok I found it, there was an exra , after the 2, thanks for the help

No problem, good luck with your project! :stuck_out_tongue: