Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the code snippet how can one extend the above functionality using two additional LED modules such that your program displays a creative blinking pattern?

Using the code snippet how can one extend the above functionality using two additional LED modules such that your program displays a creative blinking pattern? The pattern should continue to appear as long as the program is running. Your pattern should be smooth and clearly demonstrate creativity based on changing LED speeds (e.g. sleep frequency). A pattern, for example, could be a representation of a musical notation, or an advertisement scrolling pattern, among others.

 

#main program my LED =4 pinMode (my LED, "OUTPUT") #loop indefinitely to display pattern while True: try: digitalWrite(my LED, 1) print("ON") # for command debugging sleep (1) digitalWrite(myLED, 0) print("Off") # for command line debugging sleep (1) except KeyboardInterrupt: digitalWrite(myLED, 0) break except 10Error: digitalWrite (my LED, 0) print("An Error Occured") # for command line debugging break

Step by Step Solution

There are 3 Steps involved in it

Step: 1

To create a creative blinking pattern using two additional LED modules with varying speeds you can m... 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_2

Step: 3

blur-text-image_3

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

Financial Reporting Financial Statement Analysis And Valuation A Strategic Perspective

Authors: James M. Wahlen, Stephen P. Baginski, Mark Bradshaw

9th Edition

1337614689, 1337614688, 9781337668262, 978-1337614689

More Books

Students also viewed these Programming questions

Question

8. Name the three catecholamine neurotransmitters.

Answered: 1 week ago