After finished the last part, you must know how to use input and output pins.

Now you are ready to go. You will try more with the LED and buzzer. Usually, in one project, you will use more than one input or output. So follow these examples based on what you have learned before.

  • ButtoncontrolLED - when the button is pressed, the input value will be changed. If it is detected, turn on the led.

  • BlinkAnalogIn - change the sleep time with the raw value read from the analog pin to change the blink frequency.

  • BlinkTimer - use the timer to set interrupt and every second the led will be toggled.

  • BrightnessAnalogIn - set the duty cycle of the PWM output with the float number between 0.0 and 1.0 read from the analog pin.

  • LEDsBrightnessControl - brighten and dim three LEDs alternatively by increasing and decreasing the duty cycle of the PWM output.

  • Debounce - when the button is pressed, check the input signal in a certain period to ensure the exact status of the button and then turn on the onboard led.

  • PWMSoundOutput - change the frequency of the PWM output to generate different notes.

  • PWMMelody - list a combination of the frequencies of different pitches to generate a harmonious melody.