100S11_PS4

100S11_PS4 - ENES 100 Introduction to Engineering Design...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Engineering Design Spring 2011 1 / 4 Problem Set #4 Assigned: Feb. 26, 2011 Due: In class on Feb. 28 (M) or Mar. 1 (Tu) Reading: Study Friday Lectures and Class Presentations ( Chapter 6 of the course text on RobotC Programming) Problems: 1. In the lecture, a wiring schematic was provided which uses two CdS photoresistors on a single analog input port on the Arduino. Suppose your team decided to build a hovercraft that uses these CdS photoresistors to determine the black or white areas of the track. The sensor circuit is connected as shown. You also made measurements of the resistances of the sensors (accurate to within +/- 50Ω) and created a table of values for the resistances when the sensors are over the black or white areas of the track the result is as follows. a. What are the values of „val‟ displayed in the serial monitor when you run the sketch shown below for the four possible scenarios (i.e., WW, WB, BW, BB). Would you be able to distinguish between these four states? int analogPin = 0; int val = 0; void setup() { Serial.begin(9600); } void loop() { val = analogRead(analogPin); Serial.println(val);} b. Suppose your teammate accidentally connected the A0 pin of the Arduino to the node between the 10k resistor and R1. Would you still be able to identify the four different states? Why or why not? Sensor 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

100S11_PS4 - ENES 100 Introduction to Engineering Design...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online