Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In total, youll be uploading the following items to Moodle: 1. Part 1: a. Lastname_p1.py, replacing Lastname with your last name 2. Part 2: a.

In total, youll be uploading the following items to Moodle:\ 1. Part 1:\ a. Lastname_p1.py, replacing Lastname with your last name\ 2. Part 2:\ a. Lastname_p2.py, replacing Lastname with your last name\ b. Lastname_p2.png/.jpg/.pdf/some other type of photo format for your screenshot\ \ Part 1 (80 points total): Youll be using the SenseHat to detect various weather conditions and create custom images. Specifically, write a Python script that:\ 1. (10 points) Displays a rainbow when the temperature is above 68 degrees F (20 degrees Celsius) and the humidity is above 80%\ a. What we went over in class on Monday.\ 2. (15 points) A sun when the temp is above 68F (20 C) and humidity is below 80%\ a. Draw a rough circle but all LEDs inside are yellow \ 3. (25 points) Snow when the temp is below 32 F (0 C) and humidity is above 80%\ a. HINT: color every other LED white on your array, wait 1 second, then alternately toggle the LEDs \ 4. (25 points) Rain when temp is above 32 F (0 C) and humidity is equal to 100%\ a. HINT: color every other LED blue on your array, wait 1 second, then alternately toggle the LEDs\ 5. (5 points) Displays nothing on the LED matrix otherwise\ \ Note that in order to test your script, you may need to temporarily hard-code the temperature and humidity sensor values, however the Python script that you upload must read the temperature and humidity sensors. Failure to replace hard-coded values with actual sensor readings will result in -50% for this section. The whole point of this assignment is to use sensors and actuators correctly.\ \ \ Part 2 (20 points total): \ (15 points) Write a Python script that reads any sensor on the SenseHat other than temperature and humidity. Print the value of the sensor to the screen, wait 1 second, and then print the next value. Run this program indefinitely (i.e., use a while True loop as shown in the slides) in some type of terminal, such as in the terminal on the Pi directly. \ \ (5 points) Upload a screenshot of your sensor values changing over time (i.e., execute your script and run it for several seconds). You should have at least 8 sensor readings and the sensor reading value must have changed from the initial value.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

how would you have done things differently?

Answered: 1 week ago