Hi everyone, i am getting error on code generation, can anyone help me?

#include <Servo.h>
#include <MyDelay.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x23,2, 3, 0, 4, 6, 6, 9, 8, POSITIVE);
Servo servo1;
Servo servo2;
MyDelay fourmsec(500);
MyDelay halfsec(100);
MyDelay sixmsec(6000);
MyDelay onesec(3000);
MyDelay onehalfsec(3500);
MyDelay twosec(1000);
MyDelay fivehalfsec(1500);

bool init1 = false;
bool init2 = false;
bool init3 = false;
bool init4 = false;
bool init5 = false;
bool init6 = false;

const int op_cnt = 15;
int current_id;
bool operation;
bool onoff;

please check for me!!

@nasuone, your topic has been moved to a more suitable location on the forum.

Can you please take some time to read How to get the best out of this forum and apply what your leard from it (e.g. the use of code tags).

For your problem, where is setup()? Where is loop()? What is the full error message that your get?

Nothing that we can do with what you posted. The code is incomplete and you have not told us the errors.

The code that you posted looks very familiar. It is very like code from this post. Are the errors the same?

Yes,thats its My code,but it's not the entire code...and has not setup,or loop..

So you have some code that you've only shown us part of so we can't even try to compile it. Then you have some errors that you haven't shown us at all or told us anything about.

Nope, not going to be able to help with that. Good luck.

double-posting is not allowed here. repeated double-posting has the consequencey of beeing banned for a week from using the forum.


You should post code by using code-tags
There is an automatic function for doing this in the Arduino-IDE
just three steps

  1. press Ctrl-T for autoformatting your code
  2. do a rightclick with the mouse and choose "copy for forum"
  3. paste clipboard into write-window of a posting

The error-messages are telling you what is wrong

:226:1: error: expected declaration before '}' token



exit status 1

'draw_menu' was not declared in this scope

You should take care of formatting and delete not nescessary empty lines to make it easier to find the relevant lines
best regards Stefan

I might not be awake yet; where do you get the error message from?

From the other thread where the user posted to the same problem.
See post #3 in this thread from ground_fungus
If you can merge the threads this might makes sense
best regards Stefan

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.