Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Exercises | ||||||||
Line: 67 to 67 | ||||||||
End of the second exercise session | ||||||||
Added: | ||||||||
> > | Programming the user LED on the CPU card | |||||||
Changed: | ||||||||
< < | -- Uli Raich - 2022-10-14 | |||||||
> > | Write a program that blinks the user programmable LED on the CPU card at a frequency of 1 Hz (500 ms on, 500 ms off)
Write a function that blinks the LED once with a delay that is passed as a parameter:
def blink_once(delay):Test the function with a main program calling is with different delays. Use the function to implement a program that blinks an SOS: 3 short pulses, followed by 3 long pulses, followed by 3 short pulses, followed by a 2s pause. You may use a 200 ms delay for the short pulses and 700 ms delay for the long ones. Reading the pushbuttonWrite a program that reads the push button state ever 100 ms and prints its state (pressed or released) Improve the program printing the state only when there was a state change. # Session 4Reading an analogue signal level from the slider potentiometer-- [[Main.U][ U liRaich - 2022-10-14]] | |||||||
Comments |