This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] LP5024EVM:所有 LED 均关闭0.5秒(呼吸光)

Guru**** 2470160 points
Other Parts Discussed in Thread: LP5024EVM

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1343615/lp5024evm-all-led-off-0-5-sec-breath-light

器件型号:LP5024EVM

您好!

我正在 LP5024EVM 上构建呼吸灯代码。

我发现我的代码,将关闭所有 LED 0.5sec 后,它完成红色和绿色 LED 的扫描。

是硬件还是软件问题?

我的代码:

//颜色扫描
 for (int i = 0;i < color_bright;i++)
   Wire.beginTransmission(ADDRESS_SLAVE);
   Wire.write (0x06)
   Wire.write (I) // LED BankC 颜色为蓝色
   Wire.endTransmission ();
  //delay (10);

   对于(int j = 0;j < color_bright;j++)
    Wire.beginTransmission(ADDRESS_SLAVE);
    Wire.write (0x05)
    Wire.write (j) // LED Bankb 颜色为 绿色
    Wire.endTransmission ();
    延迟(10)
   
      对于(int k = 0;k < color_bright;k++)
        Wire.beginTransmission(ADDRESS_SLAVE);
        Wire.write (0x04)
        Wire.write (k) // LED Banka 颜色为 红色
        Wire.endTransmission ();
        延迟(10)
       
            对于(int k = color_bright; k >0;k--){
        Wire.beginTransmission(ADDRESS_SLAVE);
        Wire.write (0x04)
        Wire.write (k) // LED Banka 颜色为 红色
        Wire.endTransmission ();
        延迟(10)
       
   对于(int j = color_bright;j < 0;j-)
    Wire.beginTransmission(ADDRESS_SLAVE);
    Wire.write (0x05)
    Wire.write (j) // LED Bankb 颜色为 绿色
    Wire.endTransmission ();
    延迟(10)
   

  
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Gordon、

    请给我一些时间,因为我在商务旅行。 我稍后会回复。

    感谢您的耐心!

    BR、Jared

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Gordon、

    很抱歉这么晚才回复。

    我在您的代码上没有看到任何问题。 您能否捕获一些波形、以确定在发送代码时 LED 何时熄灭? 谢谢!

    BR、Jared