Answered step by step
Verified Expert Solution
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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started