adafruit / Adafruit_IO_Arduino

Arduino library to access Adafruit IO from WiFi, cellular, and ethernet modules.
Other
208 stars 108 forks source link

Expose void WiFi.setLEDs through AdafruitIO_AIRLIFT #132

Closed ptbw closed 4 years ago

ptbw commented 4 years ago

[Enhancement request] Expose void WiFi.setLEDs through AdafruitIO_AIRLIFT

Expose the WiFi.setLEDs method to allow simple access to the RGB LED on the Feather AirLift ie:

class AdafruitIO_AIRLIFT : public AdafruitIO {
  public:
...
  /**************************************************/
  /* directly access LED on AirLift feather         */
  /**************************************************/
    void setLEDs( int r, int g, int b) {
      WiFi.setLEDs( r, g, b);
   }  
...
}
ladyada commented 4 years ago

@ptbw can you please submit a PR? that way we can more quickly test/approve :)

brentru commented 4 years ago

@ptbw This could be useful - what are you hoping for with this request? As it stands, this snippet asks for LEDs to be exposed at the network interface level.

Do you want the LEDs to be changed when Adafruit IO library functions are executed (red for unable to connect, blink when new packets are received?)?

ptbw commented 4 years ago

@brentru I was looking for an easy way to access the LED on the AirLift feather wing via the AdafruitIO_AIRLIFT class as it was available in the WiFi class, to do exactly what you are suggesting and surprised it was not available to the inheritor. I will create a pull request.

brentru commented 4 years ago

@ptbw Sounds good, do make sure that it's only valid for the Airlift co-processor (we detect this in _WiFi.h). This library uses other network interface types which do not necessarily have the functionality of the WiFiNINA classes

ptbw commented 4 years ago

@brentru You did warn me but how do I reproduce the CI build tests on my Ubuntu machine, so I can avoid issues in future as just manipulating the config.h file is clearly not enough or changing the board type in the Arduino IDE?

brentru commented 4 years ago

Doxygen: https://learn.adafruit.com/the-well-automated-arduino-library/doxygen

For clang, the formatting script is within https://github.com/adafruit/ci-arduino

brentru commented 4 years ago

Released, https://github.com/adafruit/Adafruit_IO_Arduino/releases/tag/3.8.0, closing