/Longan-Nano-Rainbow

PWM control of RGB led with alternate function and with interrupts for normal gpio pins

Primary LanguageC

Longan Nano Rainbow PWM Example

Display rainbow colors with onboard RGB led

Topics

It will contain various examples that should be reusable in other code

  • Serial output with printf()
  • Configure PWM to toggle timer pin via advanced function
  • Configure PWM to toggle any output pin via interrupt and normal gpio
Nano USB2Serial Comment
3V3 Vcc not needed if powered via USB or other
Gnd Gnd
A9 (T0) Rx
A10 (R0) Tx not needed if flashing via USB/DFU or JTAG

or

Nano Sipeed JTAG Comment
3V3 3V3 not needed if powered via USB or other
Gnd Gnd
A9 (T0) RXD
A10 (R0) TXD not needed if flashing via USB/DFU or JTAG
JTDO TDO \
JTDI TDI \ not needed if
JTCK TCK / debugging not used
JTMS TMS /

Documentation

Tested with PlatformIO on a Longan Nano *

Legal

  • Author Joachim Banzhaf
  • License Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)