problem with my sketch

escusme my post fly riwrite i have problem with my sketch arduino 2560 arduino not upload

i have:

ARDUINO 2560

DS1307

18B20 SENSOR

this my sketch :

include <MenuBackend.h> //MenuBackend library
#include <LiquidCrystal.h>
#include <Wire.h>
#include <RTClib.h>

int orario;
char buffer[10];
unsigned long time=0;
unsigned long timeSet=0;
int setModeTime=2000;
int nMenu=0; // VARIABILE CHE IDENTIFICA IL MENU’ IN USO
const int sensorPin=A0;
int temperatura=0.0;
int sensorval=0.0;
float volt=0.0;
float tRisc = 25.0;
float dRisc = 2.0; // VARIABILI RISCALDATORE
float tRefrig = 27.0;
float dRefrig = 2.0; // VARIABILI REFRIGERATORE

RTC_DS1307 RTC;

const int buttonPinLeft = 22; // pin Giu
const int buttonPinRight = 24; // pin Su
const int buttonPinEsc = 28; // pin Esc
const int buttonPinEnter = 26; // pin OK
const int buttonPiu = 30; // pin modifica più
const int buttonMeno = 32; // pin modifica meno
const int temp = A0; // pin sensore temperatura
const int refrig = 53; // USCITA REFRIGERATORE
const int risc = 51; // USCITA RISCALDATORE

///////////////////////////////////////////////////////////////////////////////////////
// VARIABILI CANALE 1 //
int FACH1=5;
int FTCH1=5; //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH1h = 12;
int ACH1m = 0;
int TCH1h = 0;
int TCH1m = 0;
const int LED1 = 2; // definisce il pin per la prima fila di led
boolean alba1 = true;
boolean tramonto1 = true;
int stepA1 = 0;
int stepA11 = 0;
int stepT1 = 0;
int stepT11 = 0;
char CH1ora[5]="";
int x1=0;
int ACH1timer = {
0, 0};
int TCH1timer = {
0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
// VARIABILI CANALE 2 //
int FACH2=5;
int FTCH2=5; //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH2h = 12;
int ACH2m = 30;
int TCH2h = 23;
int TCH2m = 30;
const int LED2 = 3; // definisce il pin per la seconda fila di led
boolean alba2 = true;
boolean tramonto2 = true;
int stepA2 = 0;
int stepA22 = 0;
int stepT2 = 0;
int stepT22 = 0;
char CH2ora[5]="";
int x2=0;
int CH2timer = {
0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
// VARIABILI CANALE 3 //
int FACH3=5;
int FTCH3=5; //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH3h = 13;
int ACH3m = 0;
int TCH3h = 23;
int TCH3m = 0;
const int LED3 = 4; // definisce il pin per la terza fila di led
boolean alba3 = true;
boolean tramonto3 = true;
int stepA3 = 0;
int stepA33 = 0;
int stepT3 = 0;
int stepT33 = 0;
char CH3ora[5]="";
int x3=0;
int CH3timer = {
0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
// VARIABILI CANALE 4 //
int FACH4=5;
int FTCH4=5; //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH4h = 13;
int ACH4m = 30;
int TCH4h = 22;
int TCH4m = 30;
const int LED4 = 5; // definisce il pin per la quarta fila di led
boolean alba4 = true;
boolean tramonto4 = true;
int stepA4 = 0;
int stepA44 = 0;
int stepT4 = 0;
int stepT44 = 0;
char CH4ora[5]="";
int x4=0;
int CH4timer = {
0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
// VARIABILI CANALE 5 //
int FACH5=5;
int FTCH5=5; //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH5h = 14;
int ACH5m = 0;
int TCH5h = 22;
int TCH5m = 0;
const int LED5 = 6; // definisce il pin per la quinta fila di led
boolean alba5 = true;
boolean tramonto5 = true;
int stepA5 = 0;
int stepA55 = 0;
int stepT5 = 0;
int stepT55 = 0;
char CH5ora[5]="";
int x5=0;
int CH5timer = {
0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
// VARIABILI CANALE 6 //
int FACH6=5;
int FTCH6=5; //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH6h = 14;
int ACH6m = 30;
int TCH6h = 21;
int TCH6m = 30;
const int LED6 = 7; // definisce il pin per la sesta fila di led
boolean alba6 = true;
boolean tramonto6 = true;
int stepA6 = 0;
int stepA66 = 0;
int stepT6 = 0;
int stepT66 = 0;
char CH6ora[5]="";
int x6=0;
int CH6timer = {
0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
// VARIABILI CANALE 7 //
int FACH7=5;
int FTCH7=5; //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH7h = 15;
int ACH7m = 0;
int TCH7h = 21;
int TCH7m = 0;
const int LED7 = 8; // definisce il pin per la settima fila di led
boolean alba7 = true;
boolean tramonto7 = true;
int stepA7 = 0;
int stepA77 = 0;
int stepT7 = 0;
int stepT77 = 0;
char CH7ora[5]="";
int x7=0;
int CH7timer = {
0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
// VARIABILI CANALE 8 //
int FACH8=5;
int FTCH8=5; //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH8h = 15;
int ACH8m = 30;
int TCH8h = 20;
int TCH8m = 30;
const int LED8 = 9; // definisce il pin per l’ottava fila di led
boolean alba8 = true;
boolean tramonto8 = true;
int stepA8 = 0;
int stepA88 = 0;
int stepT8 = 0;
int stepT88 = 0;
char CH8ora[5]="";
int x8=0;
int CH8timer = {
0, 0};
///////////////////////////////////////////////////////////////////////////////////////

int lastButtonPushed = 0;

int lastButtonEnterState = LOW;
int lastButtonEscState = LOW;
int lastButtonLeftState = LOW;
int lastButtonRightState = LOW;

long lastEnterDebounceTime = 0;
long lastEscDebounceTime = 0;
long lastLeftDebounceTime = 0;
long lastRightDebounceTime = 0;
long debounceDelay = 300; // tempo di rimbalzo

LiquidCrystal lcd(12, 11, 13, 10, 27, 25);

//Variabili del menu
MenuBackend menu = MenuBackend(menuUsed,menuChanged);

// MENU’ ILLUMINAZIONE
MenuItem menu1Item1 = MenuItem(“Item1”);
MenuItem menuCanale1 = MenuItem(“CH1”);
MenuItem menuCanale2 = MenuItem(“CH2”);
MenuItem menuCanale3 = MenuItem(“CH3”);
MenuItem menuCanale4 = MenuItem(“CH4”);
MenuItem menuCanale5 = MenuItem(“CH5”);
MenuItem menuCanale6 = MenuItem(“CH6”);
MenuItem menuCanale7 = MenuItem(“CH7”);
MenuItem menuCanale8 = MenuItem(“CH8”);
MenuItem menuCanale1ACH1=MenuItem(“ACH1”);
MenuItem menuCanale1FACH1=MenuItem(“FACH1”);
MenuItem menuCanale1TCH1=MenuItem(“TCH1”);
MenuItem menuCanale1FTCH1=MenuItem(“FTCH1”);
MenuItem menuCanale2ACH1=MenuItem(“ACH2”);
MenuItem menuCanale2FACH1=MenuItem(“FACH2”);
MenuItem menuCanale2TCH1=MenuItem(“TCH2”);
MenuItem menuCanale2FTCH1=MenuItem(“FTCH2”);
MenuItem menuCanale3ACH1=MenuItem(“ACH3”);
MenuItem menuCanale3FACH1=MenuItem(“FACH3”);
MenuItem menuCanale3TCH1=MenuItem(“TCH3”);
MenuItem menuCanale3FTCH1=MenuItem(“FTCH3”);
MenuItem menuCanale4ACH1=MenuItem(“ACH4”);
MenuItem menuCanale4FACH1=MenuItem(“FACH4”);
MenuItem menuCanale4TCH1=MenuItem(“TCH4”);
MenuItem menuCanale4FTCH1=MenuItem(“FTCH4”);
MenuItem menuCanale5ACH1=MenuItem(“ACH5”);
MenuItem menuCanale5FACH1=MenuItem(“FACH5”);
MenuItem menuCanale5TCH1=MenuItem(“TCH5”);
MenuItem menuCanale5FTCH1=MenuItem(“FTCH5”);
MenuItem menuCanale6ACH1=MenuItem(“ACH6”);
MenuItem menuCanale6FACH1=MenuItem(“FACH6”);
MenuItem menuCanale6TCH1=MenuItem(“TCH6”);
MenuItem menuCanale6FTCH1=MenuItem(“FTCH6”);
MenuItem menuCanale7ACH1=MenuItem(“ACH7”);

help me please :(

help me please

Bumping a post after less than an hour pisses a lot of people off.

Not reading the sticky posts at the top of the forum pisses a lot of people off.

Improperly posting code, evidence that you didn't read the stickies, pisses a lot of people off.

Piss poor descriptions of the problem pisses a lot of people off.

You're not doing very good here.

scusme forum

How to use this forum

Please edit your post, select the code, and put it between [code][/code] tags.

You can do that by hitting the # button above the posting area.

Is this in any way related to this post?

http://forum.arduino.cc/index.php?topic=271315

marco3020: I may have found the problem, in the sketch that I 'm not there dichisrati the menawell 700 lddh that I have connected to arduino pwm output , in the current sketch I how do I add them ?

You are posting gibberish, sorry. We don't understand you.

arduino not upload

include <MenuBackend.h>

That should be #include <MenuBackend.h>

Please, please use code tags, and DO NOT attach .docx files.

I forgot to comment on that. I think this is the first time I've seen an Open Office sketch submitted. It was pretty unreadable.

this

sketch_sep09a_modificato_alba_tramonto_seriale.ino (47.9 KB)

int temperatura=0.0;
int sensorval=0.0;
float volt=0.0;

Understanding what an int is, and what kind of value it can hold is pretty basic.

    if (x1 == 50)
    {
      tramonto1=true;
    }
    stepA11 = stepA11 + stepA1;
    }
    else
    {
      stepA11 = millis();
    }

The number of curly braces here is wrong. The else statement is not associated with the if statement.

The pulischermo() function is missing a close }.

Why the hell would you write all that code without trying to compile as each block was added? If it failed to compile, why would you keep adding code? Errors do not fix themselves by writing another 100 lines of code.

Go through that mess. Put EVERY { on a new line, and MANUALLY indent the code properly between the { and the matching }. That is you penance for failing to match { and } as you went along. When you find { and don't have appropriate }, add the appropriate }. When you have a } that doesn't match a {, figure out whether you need to add a { or delete the }.

stepA1 = ((FACH1*60000)/255);

Check your (16 bit) arithmetic.
All of these “step” variables look like good candidates for arrays.

thanks for the help you tell me exactly what to fix .

you tell me exactly what to fix .

You fix all the things that are wrong.

good?

forum.ino (48 KB)

good?

No. You've added about 42 bazillion useless curly braces to loop().

Was there some part of "Put EVERY { on a new line" that you failed to understand?

i'am can't programing arduino because i dont have esperience, help me please let making SOME sign come fix it Thanks

marco3020: i'am can't programing arduino because i dont have esperience, help me please let making SOME sign come fix it Thanks

Look, keeping on posting here won't make someone take your code and fix it all up.

I suggest you start from scratch, and get one thing going at a time. Your current code does not compile. Start with something simple, like testing your switches. Then display things on the LCD. Stop when you get a compile error and fix it. Stop if the code is not doing what you expect and fix it.

Stuff like below should be turned into a struct, and then make an array of those structs. This is just needlessly complex. I'm confused looking at it, so I don't wonder that you are as well:

///////////////////////////////////////////////////////////////////////////////////////
//                                VARIABILI CANALE 1    BLU                             //
int FACH1=10;
int FTCH1=10;         //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH1h = 8;
int ACH1m = 0;
int TCH1h = 16;
int TCH1m = 0;
const int LED1 = 2;        //  definisce il pin per la prima fila di led
boolean alba1 = true;
boolean tramonto1 = true;
int stepA1 = 0;
int stepA11 = 0;
int stepT1 = 0;
int stepT11 = 0;
char CH1ora[5]="";
int x1=0;
int ACH1timer[] = {
  0, 0};
int TCH1timer[] = {
  0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
//                                VARIABILI CANALE 2   BIANCO                              //
int FACH2=10;
int FTCH2=10;         //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH2h = 8;
int ACH2m = 20;
int TCH2h = 16;
int TCH2m = 10;
const int LED2 = 3;        //  definisce il pin per la seconda fila di led
boolean alba2 = true;
boolean tramonto2 = true;
int stepA2 = 0;
int stepA22 = 0;
int stepT2 = 0; 
int stepT22 = 0;
char CH2ora[5]=""; 
int x2=0;
int CH2timer[] = {
  0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
//                                VARIABILI CANALE 3    ROSSO                             //
int FACH3=10;
int FTCH3=10;         //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH3h = 8;
int ACH3m = 30;
int TCH3h = 16;
int TCH3m = 20;
const int LED3 = 4;        //  definisce il pin per la terza fila di led
boolean alba3 = true;
boolean tramonto3 = true;
int stepA3 = 0;
int stepA33 = 0;
int stepT3 = 0;
int stepT33 = 0;
char CH3ora[5]=""; 
int x3=0;
int CH3timer[] = {
  0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
//                                VARIABILI CANALE 4   CYANO                              //
int FACH4=10;
int FTCH4=10;         //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH4h = 8;
int ACH4m = 0;
int TCH4h = 16;
int TCH4m = 0;
const int LED4 = 5;        //  definisce il pin per la quarta fila di led
boolean alba4 = true;
boolean tramonto4 = true;
int stepA4 = 0;
int stepA44 = 0;
int stepT4 = 0;
int stepT44 = 0;
char CH4ora[5]=""; 
int x4=0;
int CH4timer[] = {
  0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
//                                VARIABILI CANALE 5    UV                             //
int FACH5=10;
int FTCH5=10;         //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH5h = 8;
int ACH5m = 45;
int TCH5h = 16;
int TCH5m = 10;
const int LED5 = 6;        //  definisce il pin per la quinta fila di led
boolean alba5 = true;
boolean tramonto5 = true;
int stepA5 = 0;
int stepA55 = 0;
int stepT5 = 0;
int stepT55 = 0;
char CH5ora[5]=""; 
int x5=0;
int CH5timer[] = {
  0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
//                                VARIABILI CANALE 6      BLU                           //
int FACH6=10;
int FTCH6=10;         //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH6h = 8;
int ACH6m = 0;
int TCH6h = 16;
int TCH6m = 0;
const int LED6 = 7;        //  definisce il pin per la sesta fila di led
boolean alba6 = true;
boolean tramonto6 = true;
int stepA6 = 0;
int stepA66 = 0;
int stepT6 = 0;
int stepT66 = 0;
char CH6ora[5]=""; 
int x6=0;
int CH6timer[] = {
  0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
//                                VARIABILI CANALE 7       UV                          //
int FACH7=10;
int FTCH7=10;         //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH7h = 8;
int ACH7m = 0;
int TCH7h = 16;
int TCH7m = 0;
const int LED7 = 8;        //  definisce il pin per la settima fila di led
boolean alba7 = true;
boolean tramonto7 = true;
int stepA7 = 0;
int stepA77 = 0;
int stepT7 = 0;
int stepT77 = 0;
char CH7ora[5]="";
int x7=0;
int CH7timer[] = {
  0, 0};
///////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////
//                                VARIABILI CANALE 8      BIANCO                           //
int FACH8=10;
int FTCH8=10;         //DURATA ALBA/TRAMONTO ESPRIMERE IN MINUTI
int ACH8h = 8;
int ACH8m = 20;
int TCH8h = 16;
int TCH8m = 10;
const int LED8 = 9;        //  definisce il pin per l'ottava fila di led
boolean alba8 = true;
boolean tramonto8 = true;
int stepA8 = 0;
int stepA88 = 0;
int stepT8 = 0;
int stepT88 = 0;
char CH8ora[5]="";
int x8=0;
int CH8timer[] = {
  0, 0};
///////////////////////////////////////////////////////////////////////////////////////

i have try i have this error

This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: “Arduino Mega 2560 or Mega ADK”
sketch_piano_piano_lo_sistemo.ino: In function ‘void setup()’:
sketch_piano_piano_lo_sistemo:246: error: expected initializer before ‘sensorval’
sketch_piano_piano_lo_sistemo.ino: In function ‘void loop()’:
sketch_piano_piano_lo_sistemo:554: error: expected `}’ at end of input

sketch_piano_piano_lo_sistemo.ino (16.6 KB)

void setup ()
{
stepA1 = ((FACH1*60000)/255);
  stepT1 = ((FTCH1*60000)/255);
  stepA2 = ((FACH2*60000)/255);
  stepT2 = ((FTCH2*60000)/255);
  stepA3 = ((FACH3*60000)/255);
  stepT3 = ((FTCH3*60000)/255);
  stepA4 = ((FACH4*60000)/255);
  stepT4 = ((FTCH4*60000)/255);
  stepA5 = ((FACH5*60000)/255);
  stepT5 = ((FTCH5*60000)/255);
  stepA6 = ((FACH6*60000)/255);
  stepT6 = ((FTCH6*60000)/255);
  stepA7 = ((FACH7*60000)/255);
  stepT7 = ((FTCH7*60000)/255);
  stepA8 = ((FACH1*60000)/255);
  stepT8 = ((FTCH1*60000)/255);
 {
  void rilevTemp(void)

  sensorval=analogRead(sensorPin);

It looks a bit like you're trying to define a function "rilevTemp" inside "setup". That isn't allowed.

I Uploaded the Program and takes it, but it is followed by The Times ,
how do I SEE What ramp is Light ?

sketch_piano_piano_lo_sistemo.ino (16.7 KB)