element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Code Exchange
  • Technologies
  • More
Code Exchange
Blog Need help coding
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Code Exchange to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: rmiltenberger
  • Date Created: 16 Mar 2018 11:24 PM Date Created
  • Views 2569 views
  • Likes 0 likes
  • Comments 9 comments
Related
Recommended

Need help coding

rmiltenberger
rmiltenberger
16 Mar 2018

I have 4 sparkfun lummenati 3x3 bParts,

  I having a problem finding a code,

i have them daisy chained would like to make

a top hat band

any help would be greatly appreciated

thanks bob

  • Sign in to reply

Top Comments

  • rmiltenberger
    rmiltenberger over 7 years ago +3
    To Shabez, and Dave,, Wow, ok it took some doing, and slit of research. But I have my matrix, up and running. And it's gorgeous... 3x36 lights running... various colors across each successive board...…
  • beacon_dave
    beacon_dave over 7 years ago in reply to rmiltenberger +2
    Here was my first attempt with APA102C LED's & the FastLED library Data on pin 6 Clock on pin 7 #include <FastLED.h> #define NUM_LEDS 1 #define DATA_PIN 6 #define CLOCK_PIN 7 CRGB leds[NUM_LEDS]; void…
  • shabaz
    shabaz over 7 years ago in reply to rmiltenberger +2
    Hi Robert, If you can paste the entire output error, it will help, because it will likely mention which line the error was on. Also, precision is key, because you state the error is 'Leds does not name…
Parents
  • beacon_dave
    beacon_dave over 7 years ago

    They appear to be based on the APA102C pixel LEDs. As Shabaz has already told you in the other thread, you can use the FastLED library on the Arduino for this.

    FastLED LED animation library for Arduino (formerly FastSPI_LED) 

    https://github.com/FastLED/FastLED/wiki

     

    Arduino Basics: NeoPixel Playground

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rmiltenberger
    rmiltenberger over 7 years ago in reply to beacon_dave

    Hi Dave

    thanks, but as a total newbie,

    im not sure what I'm looking at,,

    i was given these boards and I'm lost in what I'm looking at,, I need more help than be directed to a library,,

    i appreciate your help a great deal but I'm still lost

    thanks

    bob

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 7 years ago in reply to rmiltenberger

    Take a look at the code sample at:

    Arduino Basics: NeoPixel Playground

     

    It's for Neopixels (WS2812B), so you will need to make a change for using APA102C

     

    After line 29:

    #define DATA_PIN 6

    you will need to add:

    #define CLOCK_PIN 7

     

    These pins 6 & 7 are the pins on the Arduino you have connected your LED data and clock lines to.

     

    Line 63 in the code:

    FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);

     

    needs changing to:

    FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 7 years ago in reply to rmiltenberger

    Here was my first attempt with APA102C LED's & the FastLED library

     

    Data on pin 6

    Clock on pin 7

     

    #include <FastLED.h>
    #define NUM_LEDS 1
    #define DATA_PIN 6
    #define CLOCK_PIN 7
    CRGB leds[NUM_LEDS];
    void setup() 
    {
       // put your setup code here, to run once:
       FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_MHZ(12)>(leds, NUM_LEDS);
    }
    void loop() 
    {
       // put your main code here, to run repeatedly:
       // Turn the first led red for 1 second
          leds[0] = CRGB::Red; 
          FastLED.show();
          delay(1000);
       // Turn the first led green for 1 second
          leds[0] = CRGB::Green; 
          FastLED.show();
          delay(1000);
       // Turn the first led blue for 1 second
          leds[0] = CRGB::Blue; 
          FastLED.show();
          delay(1000);
          // Set the first led back to black for 1 second
          leds[0] = CRGB::Black;
          FastLED.show();
          delay(1000);
    }

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rmiltenberger
    rmiltenberger over 7 years ago in reply to beacon_dave

    Dave

      thanks it's something

     

    i can only see 30 lines of code,

    it a start

    I've not done anything with this stuff before

    so I'm learning

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rmiltenberger
    rmiltenberger over 7 years ago in reply to beacon_dave

    when I compile I get Leds does not name a type

     

    sorry to bother you ,,

    if you want we can text

     

    617-275-9212

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • rmiltenberger
    rmiltenberger over 7 years ago in reply to beacon_dave

    when I compile I get Leds does not name a type

     

    sorry to bother you ,,

    if you want we can text

     

    617-275-9212

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • shabaz
    shabaz over 7 years ago in reply to rmiltenberger

    Hi Robert,

     

    If you can paste the entire output error, it will help, because it will likely mention which line the error was on.

    Also, precision is key, because you state the error is 'Leds does not name a type' but there is no identifier called 'Leds' -

    there is one called 'leds' and the capitalisation makes a big difference. So, I can't tell if there is a mistake in the typing of the error message, or some other mistake.

    This ambiguity would not occur, if you can precisely paste the exact output you see.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube