1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ワイヤレスLED OSWM43-W5W を ワイヤレス給電ユニット OSWPTS1208D で光らせる

Last updated at Posted at 2019-10-12

ワイヤレスLED
ワイヤレスLED
ワイヤレス給電ユニット
ワイヤレス給電ユニット

ワイヤレスLEDと給電ユニットを購入したので光らせてみました。
給電ユニットはArduino uno の5Pin-Gnd につないでいます。

void setup() {
  //https://playground.arduino.cc/Main/TimerPWMCheatsheet/
  TCCR0B = (TCCR0B & 0b11111000) | 0x01; // 62500Hz
}

float cy=0.f;
void loop() {
  float dt = (1.f+sin(cy*PI*2.0f))*0.5f*255.f;
  analogWrite(5, int(dt)); // duty
  cy += 0.01f;
  if(cy>1.0f){
    cy -= 1.0f;
  }
  delay(10.0f*62500.0f/976.56f);
}

動画
2019-10-12_171636.png

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?