• RasPiO Shop
  • Pro Hat
  • Analog Zero
  • Duino
    • duino-assembly
    • duino-setup
    • duino-programming
    • duino-videos
    • lcd20
  • RasPiO Products
    • inspiring
    • Pro Hat
    • Analog Zero
    • Duino
      • lcd20
    • Portsplus
    • GPIO ruler
    • GPIO Zero ruler
    • Breakout
    • 7 Seg kit
  • About RasPiO®
RasP.iO

Wemos Demo Sketch for RasPiO InsPiRing

Posted on July 11, 2017 by alex

This works on Wemos D1 mini

#define FASTLED_ESP8266_D1_PIN_ORDER  // this lets you use Wemos pin numbering
#include<FastLED.h>                   // this brings in FastLED
#define NUM_LEDS 24                   // set LED number
#define DATA_PIN 7
#define CLOCK_PIN 5

CRGBArray<NUM_LEDS> leds;

    void setup() { 
        FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR, DATA_RATE_MHZ(12)>(leds, NUM_LEDS);
    }

void loop() {
      FastLED.clear();
      // Turn the first led red for 1 second
      //leds[0] = CRGB::Red; 
      //leds[1] = CRGB::Green;
      //leds[2] = CRGB::Blue; 
      //FastLED.show();
      //delay(1000);

      for(int i=0; i<NUM_LEDS; i++){
          leds[i].setRGB( 255, 0, 0);
      }
      FastLED.show();
      delay(1000);
      for(int i=0; i<NUM_LEDS; i++){
          leds[i].setRGB( 0, 255, 0);
      }
      FastLED.show();
      delay(1000);
      for(int i=0; i<NUM_LEDS; i++){
          leds[i].setRGB( 0, 0, 255);
      }
      FastLED.show();
      delay(1000);
}
// end
Posted in RasPiO | Tags: Wemos D1 mini sketch for RasPiO InsPiRing |
« Arduino nano demo sketch for RasPiO InsPiRing
RasPiO FullpHAT arrival tweets »

NEW Product!

NEW RasPiO® Breadboard Pi Bridge New RasPiO Breadboard Pi Bridge

Pi Ports to Breadboard in Numerical Order

Check out NEW RasPiO Online Shop New products being added daily.

Pages

  • inspiring
  • prohat
  • analogzero
  • gpioruler
  • gpiozeroruler
  • duino
    • duino-assembly
    • duino-programming
    • duino-setup
    • duino-videos
    • lcd20
  • portsplus
  • Introducing RasPiO®
  • range
  • RasPiO Breakout

Archives

  • May 2019
  • March 2019
  • October 2018
  • January 2018
  • July 2017
  • June 2017
  • December 2016
  • November 2016
  • September 2016
  • December 2015
  • November 2014
  • October 2014
  • August 2014
  • July 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2013
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Pages

  • analogzero
  • duino
    • duino-assembly
    • duino-programming
    • duino-setup
    • duino-videos
    • lcd20
  • experiment
  • gpioruler
  • gpiozeroruler
  • inspiring
  • Introducing RasPiO®
  • portsplus
  • prohat
  • range
  • RasPiO Breakout
  • RasPiO Breakout Pro
  • RasPiO Port labels

Archives

  • May 2019
  • March 2019
  • October 2018
  • January 2018
  • July 2017
  • June 2017
  • December 2016
  • November 2016
  • September 2016
  • December 2015
  • November 2014
  • October 2014
  • August 2014
  • July 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2013

WordPress

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© Alex Eames 2012-19