element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum arduino, help?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 1 reply
  • Subscribers 387 subscribers
  • Views 929 views
  • Users 0 members are here
  • lost
  • helpme
  • project
  • arduino
Related

arduino, help?

ochata
ochata over 3 years ago

HELP NEEDED FOR CODE! MY last code didn't turn out well, NEED a new code ASAP! Watch video down below to get a general idea of what we are doing

https://youtu.be/m4-2aBTBqkY

Skip to about 6:30 minutes to see the demonstration

Also read the description of project

For this project, you will create a small environmental-control system around your photo resistor. With the photo resistor in series with the 10kΩ resistor (just like in the tutorial), figure out the range of your analog input for your light environment. IE, figure out your minimum value when the photo resistor is covered and your maximum value when the photo resistor is uncovered. Use the map function to scale this range to a minimum of 200 and a maximum of 600. Then use an LED or LEDs and the servo to keep this mapped input from the photo resistor between 350 and 450. The LEDs will help you do this because they can provide light to the photo resistor if it gets too dark. The servo will help you do this because if you attach a small piece of paper or card to it, it can provide shade to the photo resistor if it gets too light. Note that the different LEDs provide different amounts of light, and vary in intensity depending on whether you look at the side, bottom, or top of one. To demonstrate the functionality of your control system you will video it working while you first shine a light on it (making the shade cover the photoresistor) and when you dim the lights in your room (making the LED's turn on). While this is happening you should be printing the value of the analogread from the photoresistor to the serial monitor...and this value should stay between 350 and 450. To read the input from the pin sensing your photoresistor on your screen, include the line Serial.begin(9600); in the setup, and Serial.println(lightLevel); just after int lightLevel = analogRead(lightPin);

  • Sign in to reply
  • Cancel

Top Replies

  • beacon_dave
    beacon_dave over 3 years ago +7
    This looks like a final project course assignment for course GE102 at Mt. Hood Community College. If you are struggling with your assignment, then you should perhaps contact the course instructor John…
  • beacon_dave
    beacon_dave over 3 years ago

    This looks like a final project course assignment for course GE102 at Mt. Hood Community College.

    If you are struggling with your assignment, then you should perhaps contact the course instructor John Dryden.

    • Cancel
    • Vote Up +7 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube