Skip to content

PWM(LEDC)

一般的なPWM系の関数群です。

利用例

メンバー

ledcSetup()

double ledcSetup(uint8_t channel, double freq, uint8_t resolution_bits)

引数

  • uint8_t channel
  • double freq
  • uint8_t resolution_bits

戻り値

double

ledcWrite()

void ledcWrite(uint8_t channel, uint32_t duty)

引数

  • uint8_t channel
  • uint32_t duty

戻り値

void

ledcWriteTone()

double ledcWriteTone(uint8_t channel, double freq)

引数

  • uint8_t channel
  • double freq

戻り値

double

ledcWriteNote()

double ledcWriteNote(uint8_t channel, note_t note, uint8_t octave)

引数

  • uint8_t channel
  • note_t note
  • uint8_t octave

戻り値

double

ledcRead()

uint32_t ledcRead(uint8_t channel)

引数

  • uint8_t channel

戻り値

uint32_t

ledcReadFreq()

double ledcReadFreq(uint8_t channel)

引数

  • uint8_t channel

戻り値

double

ledcAttachPin()

void ledcAttachPin(uint8_t pin, uint8_t channel)

引数

  • uint8_t pin
  • uint8_t channel

戻り値

void

ledcDetachPin()

void ledcDetachPin(uint8_t pin)

引数

  • uint8_t pin

戻り値

void