• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Error in code downloaded fron RNT?

Q&A Forum › Category: Arduino › Error in code downloaded fron RNT?
0 Vote Up Vote Down
Chuck Hopper asked 1 year ago

Hello.
I downloaded a sketch, Arduino – Display the LED Brightness on a LCD 16×2, from https://randomnerdtutorials.com/arduino-display-the-led-brightness-on-a-lcd-16×2/.
I copied and pasted it into a sketch on my computer, then tried to compile it. I received an error message,

exit status 1
expected ‘}’ at end of input

The last line of code, “delay(750);” was highlighted. I’m new enough to this that I’m not sure what it’s telling me is wrong,
 
What am I missing?

Question Tags: Code errors
2 Answers
0 Vote Up Vote Down
DK answered 1 year ago

Hi

} is curly braces

it indicates a function end
https://processing.org/reference/curlybraces.html
you need to add

}

https://www.computerhope.com/cdn/keyboard/bracket.jpg

that the end

maybe when you copy the code… you did not copy last curly braces

0 Vote Up Vote Down
Sara Santos Staff answered 1 year ago

Hi Chuck.
DK is right. You’ve probably forgotten to copy the last }
Can you please confirm that adding the } at the end of the code solves your problem?
Regards,
Sara
 

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Released] Build Web Servers with ESP32 and ESP8266 (version 1.0) October 27, 2020
  • [eBook Updated] Download Build ESP32-CAM Projects using Arduino IDE (version 1.1) August 31, 2020

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2021 · RandomNerdTutorials.com · All Rights Reserved