digitalRead() (0 = 0V or 1 = 5V) to read digital signals from input devices.
digitalWrite() (0V ~ 5V) to send digital signals to output devices.
Get Richard Keynes’s stories in your inbox
Join Medium for free to get updates from this writer.
PWM Outputs
PWM (Pulse Width Modulation) is used to control electric power inside the motor coil. (By using this, digital signals seem to be analog signals)
PIN_DFU / P0.20: If this pin is detected to be at GND level at startup, the board will enter a special serial bootloader mode and will not execute any user code, going straight into bootloader mode. If you wish to use this pin as a pulled high with a pullup resistor your code will execute normally when the MCU starts up.