• 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 3 years 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 3 years 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 3 years 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 Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

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

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

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.