Write an arduino sketch to read the setting of potentiometer

Assignment Help Other Engineering
Reference no: EM131271170

Microcontrollers and Arduino

This assignment requires your own materials. You do not have to record a video but you will need to upload the layout of the breadboard so I can make the video.

The lab work for this module requires you to familiarize yourself with the use of the components and modules listed below:

• Turning LEDs on and off
• Sensing the state of a pushbutton
• PWM output with analogWrite
• Reading value of potentiometer
• Using a photoresistor
• Using the DHT11 temperature and humidity sensor
• Programming the RGB LED

All the wiring and programming information is available in the textbook and/or at the resource links provided under Study Materials.

Please complete all the lab exercises given below and submit a report including a video demonstration. You will submit the report and video demonstration separately on the course website.

Report: The report should list all the major procedures required to complete each of the exercises. Here are the general guidelines for the report:

1. Cover Sheet: The lab report must include a completed cover sheet with your name, student ID number, the lab number, lab title, and submission date. Note: Your lab report will not be graded without a completed cover sheet.

2. Objective: A short paragraph stating the purpose (main ideas) of the experiment.

3. Procedure: At the beginning of this section, give a summary description of the procedures taken during the lab.

4. Discussion/Conclusion: State your understanding of this experiment. (What did you learn from these experiment?) State challenges and problems faced, and measures taken to resolve these problems and overcome challenges.

5. Arduino Sketches: At the end of the report, please append the text of all the Arduino sketches you have developed. To do this, simply cut the entire text from the Arduino IDE editor window and paste it in the report document. Start on a fresh page for each sketch.

Video Demonstration: In this section, your video demonstration should provide a visual record of the results obtained in each exercise. Please start with recording a brief video clip giving your name, course number, and assignment number. Record a video clip for each exercise according to the instructions provided. Use a video editor to combine all the clips into one video file before you submit/upload to the course website. For guidelines to record and merge video clips, check Record, Merge, and Upload Your Videos.

Exercise 1: LEDs and pushbutton

Connect three LEDs, one each of Red, Yellow, and Green, to pins A2, A4, and A6 respectively, on the breadboard. Connect a pushbutton to pin 7. Be sure to use the resistors to limit current as you have learned from the study material. Write an Arduino sketch to sequentially turn on the LEDs, one at a time. This should create a Red, Yellow, and Green LED flowing display. Now add code, in the beginning of the loop, to check the status of the pushbutton. If the button is OFF (normal) then let the LED code execute. If it is ON (pushed), then skip the LED part and go to the end of loop at a time for one second. The LED display should come on as before. When you keep the button pressed, the display would stop at the end of sequence and will remain so as long as the button is pressed. It would start again when you let go.

The video clip for this exercise should show the initial LED display and the result of the button being pushed. Please repeat by letting go and pushing the button again, two or three times.

Exercise 2: Using a potentiometer to control the brightness of LED

You have learned to control the brightness of LED using the PWM, but you were just incrementing values in a loop. You also know how to read the setting of a potentiometer. Write an Arduino sketch to read the setting of the potentiometer and use it to control the brightness of the LED. This way, you should be able to interactively control the brightness.

The video clip for this exercise should show the wiring of the experiment and the changing brightness of the LED with the setting of the potentiometer.

Exercise 3: Temperature and humidity monitor using DHT11

Load the test program given in the Reading Assignment, DHT11 Temperature and Humidity Sensor, in Arduino IDE. Modify it to send the data to the serial port every 5 seconds. Compile and download to the UNO board. Open the serial monitor window.

The video clip for this exercise should show the wiring of the experiment and the running display of the results in a serial monitor window. Reset the UNO board after starting video recording, breathe on the sensor, and display the text in the serial monitor window. [MO2.1, MO2.2, MO2.3, MO2.4, MO2.6, MO2.8]

Reference no: EM131271170

Questions Cloud

Outline the personal selling process : Discuss changes that have taken place in the personal selling function.- Outline the personal selling process, highlighting, with examples, the fundamental importance of interactivity.
Discuss the importance of closing the sale : Discuss the importance of closing the sale, illustrating with at least one closing method.- Write a brief account of emerging roles within the selling function, taking account of the impact of new technology.
What are the sources of capital for a for profit company : What are the sources of capital for a for profit company? What are the sources of capital for a not for profit organization? What are the pros and cons of the various sources of capital
Relationship between frequency and cost per contact : Discuss the balance that can be achieved between fixed salary, bonuses and incentives and the link with motivation of sales people.
Write an arduino sketch to read the setting of potentiometer : Write an Arduino sketch to read the setting of the potentiometer and use it to control the brightness of the LED. This way, you should be able to interactively control the brightness.
Prepare the employee relations and power planing : Prepare the employee relations and power planing - HR challenges in arab gulf countries
How you plan to develop your communication skill set : Write a 200- to 350-word summary of your communication quiz score, describing your strengths and weaknesses and how you plan to develop your communication skill set
Discuss the importance of measuring sales performance : Discuss the importance of measuring sales performance. Include in your discussion examples of both qualitative and quantitative measures.
Market structure of the construction industry in south afric : Using the key distinguishing features of any market structure discuss the market structure of the construction industry in South Africa

Reviews

Write a Review

Other Engineering Questions & Answers

  Does the measured gain values match the given values

Does the measured gain values match the given values? If not, explain why they are different? From the noise spectral density curve, explain the effect of increasing the frequency on the noise voltage.

  Describe and compare the ventilation systems

State reasons for the popularity of decline mining in modern operations. What factors need to be taken into account in deciding the cut off depth beyond which shaft operations should be used instead of decline access.

  Heat treatment of high tensile carbon steel

Explain why tempering cycle is essentially required in the heat treatment of high tensile carbon steel and what are the consequences if tempering cycle is not carried out?

  Draw the sequence networks

The Y winding has a solidly grounded neutral. Draw the sequence networks. Neglect the exciting admittance and assume American standard phase shift.

  Constant pressure expansion determine

Problem 1: 10 moles of an ideal gas with Cp = 32J/mol.K expands abiabatically from 340K and 5 atm to a final state where its volume doubles. For a constant pressure expansion determine

  The advantages of transforming time-domain circuits

Discuss why phasor analysis can only be performed on single-frequency circuits. For multiple frequencies what type of analysis must be performed?

  What bias current iq will serve to limit the variation

A class AB output stage, such as that in Fig, drives a load resistance RL of 100Ω. What bias current IQ will serve to limit the variation in the small-signal voltage gain to 5% as iL changes from 0 to 50 mA?

  Returned by default when executed in shell

QUESTION 2. Given a function that does not return any value, What value is returned by default when executed in shell.

  Find required value of c and minimum required value of gm

Design the cross-coupled LC oscillator of Fig. to operate at ω0 = 20 Grad/s. The IC inductors available have L = 5 nH and Q = 10. If the transistor ro = 5 kΩ, find the required value of C and the minimum required value of gm at which Q1 and Q2 ar..

  Diameter ratio of the meter

The pressure drop in a venturi meter varies only with the fluid density, pipe approach velocity, and diameter ratio of the meter. A model venturi meter tested in water at 20°C shows a 5-kPa drop when the approach velocity is 4 m/s.

  Construct the hilbert-transform image pair

Construct the Hilbert-transform image pair, based on the same phase-shift concept and evaluate the total energy of the image pair,and

  Press release analysis

Locate a recent electronic version of a print advertisement. Write a 500-word analysis that addresses the following questions:

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd