// C++ code
//#define p_r = 13;
//#define p_b = 12;
//#define p_g = 27;
//const int ledPin = A15;//使用するピンのアナログピン番号を指定
uint8_t ledR = A14;//d13
uint8_t ledG = A15;//d12
uint8_t ledB = A17;//d27
void setup() {
//Serial.begin(115200);
delay(10);
//ピンをチャンネルに接続
ledcAttachPin(ledR, 0); // assign RGB led pins to channels
ledcAttachPin(ledG, 1);
ledcAttachPin(ledB, 2);
//pwmの設定。最初の引数がchannel,次が周波数,最後が解像度(ここでは8bit = 256段階)
ledcSetup(0,12800,8);
ledcSetup(1,12800,8);
ledcSetup(2,12800,8);
ledcWrite(0,128);}
void loop() {
// 初期の明るさを指定
// 初期の明るさを指定
static uint8_t brightness = 10;
// チャネル0に明るさを設定
ledcWrite(0, brightness);
}