Sale!

EECS 303 Assignment 2 solution

$30.00 $25.50

Category:

Description

5/5 - (9 votes)

Reading temperature sensor: RPi transactons with DHT11 sensor

DTH11 is an intelligent temperature/humidity sensor which according to its specs can capture
accurate temperature and humidity environmental data. In this assignment, you will atach the
3 pins of DTH11 to the RPi’s GPIOs, for Power, Ground and data connectvity. The
communicaton between the DHT11 and RPi is asynchronous performed on a single bus line,
without clocks. DHT11 processes its raw analog data into digital and then packages every
reading into a 5-byte data format. Every RPi transacton entails capturing the data in the 40-bit
format from the DHT11 over the bus line. Three important points:
a) every RPi-to-DHT11 transacton is based on a request/acknowledge type of protocol;
b) communicaton takes place bit-serially where the informaton bits are dispatched in
sequences of pulses of specifc tme duraton.
c) RPi needs to interpret these tming pulses aaer capturing them.
Details of the operaton and transacton protocol of DHT11 are provided separately. You will
need to use the tming functons of the wiringPi library.
Part 1
Use the polling I/O technique to implement in C one RPi-to-DHT11 transacton. You should
verify the transacton output using its checksum data. You should also return the temperature
and humidity output, print it on the screen and save it in a fle (include date/tme.)
Part 2
Repeat Part 1 using the edge-triggered interrupt technique. Comment on the diferences, if any.
Part 3
Write a loop of your C code to record temperature data for a short tme. Connect your LED
circuit from Assignment 1 so that if any of the temperatures goes above a threshold, RPi will
signal the LED to turn on. To force such an event, we could place a soldering iron tp close
enough (but not too close) to the DHT11 sensor.
Let’s see how it works.
Part 4
In this Part of Assignment 2, we want to use a Display to show the temperature or humidity
once it is recorded by RPi. Connect the DISPLAY board to be provided to each group on the RPi
GPIOs. Develop a C or Python routne to show the RPi transacton data on the display. Details
about the Display will be provided.