element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Arduino
  • Products
  • More
Arduino
Blog BYOB Party #3, Infineon Library Available
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Robert Peter Oakes
  • Date Created: 15 Dec 2014 5:50 AM Date Created
  • Views 1912 views
  • Likes 8 likes
  • Comments 8 comments
  • iot_holidaylights
  • byob_party
Related
Recommended

BYOB Party #3, Infineon Library Available

Robert Peter Oakes
Robert Peter Oakes
15 Dec 2014

Back to the beginning BYOB Party #1, "Bring you own Bulbs" - The Internet of Holiday Lights

 

OK, so one thing I could not find in all the searching was a Library for the infineon Board so I made one from the sample code, it is not 100% complete yet (More features to add) but its all working so I thought I would share it with you all so you can use it if you so desire

 

I have moved all the functions into a library called "Infineon"

 

Added a function to directly set colours "SETCOLOUR(RED)" for example, so far it only has a few colours defined but If i can get a list of RGB values for LED colours 12 bit per colour then I will be happy to add them to this

 

Colours are White, Silver, Gray, Black, Red, Maroon, Yellow, Olive, Lime, Green, Aqua, Teal, Blue, Navy, Fuchsia, Purple but of course some dont look right on LEDS so i need to refine it over time, if you have some good colour definitions please contribute

 

This is the modified main loop so you can see how much cleaner it is, it of course can be improved further but this is just a test

 

  // the loop routine runs over and over again forever:
  void loop() {

    // change lamp colour to red
    RGBLEDS.I2CWRITE6BYTES(ADDRESS, INTENSITY_RGB, 0x0, 0x0, 0x0); // all off
    delay(500); // wait 1000ms
    // change lamp colour to green
    RGBLEDS.I2CWRITE6BYTES(ADDRESS, INTENSITY_RGB, 0x03ff, 0x03FF, 0x03FF); // 25%
    delay(500);
    // change lamp colour to blue
    RGBLEDS.I2CWRITE6BYTES(ADDRESS, INTENSITY_RGB, 0x07ff, 0x07ff, 0x07ff); // Blue
    delay(500);
    RGBLEDS.I2CWRITE6BYTES(ADDRESS, INTENSITY_RGB, 0x0bff, 0x0bff, 0x0bff); // Blue
    delay(500);
    RGBLEDS.I2CWRITE6BYTES(ADDRESS, INTENSITY_RGB, 0x0fff, 0x0fff, 0x0fff); // Blue
    delay(500);
  // White, Silver, Gray, Black, Red, Maroon, Yellow, Olive, Lime, Green, Aqua, Teal, Blue, Navy, Fuchsia, Purple
    RGBLEDS.SETCOLOUR( White);
    delay(500);
    RGBLEDS.SETCOLOUR(Silver );
    delay(500);
    RGBLEDS.SETCOLOUR(Gray );
    delay(500);
    RGBLEDS.SETCOLOUR(Black );
    delay(500);
    RGBLEDS.SETCOLOUR(Red );
    delay(500);
    RGBLEDS.SETCOLOUR(Maroon );
    delay(500);
    RGBLEDS.SETCOLOUR(Yellow );
    delay(500);
    RGBLEDS.SETCOLOUR(Olive );
    delay(500);
    RGBLEDS.SETCOLOUR(Lime );
    delay(500);
    RGBLEDS.SETCOLOUR(Green );
    delay(500);
    RGBLEDS.SETCOLOUR(Aqua );
    delay(500);
    RGBLEDS.SETCOLOUR( Teal);
    delay(500);
    RGBLEDS.SETCOLOUR(Blue );
    delay(500);
    RGBLEDS.SETCOLOUR(Navy );
    delay(500);
    RGBLEDS.SETCOLOUR(Fuchsia );
    delay(500);
    RGBLEDS.SETCOLOUR(Purple );
    delay(500);
  }

 

 

The cycle looks like this

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Code is attached for your pleasure

Attachments:
Infineon.cpp.zip
Infineon.h.zip
6765.RGBLED.ino.zip
  • Sign in to reply

Top Comments

  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago in reply to clem57 +3
    BY all means, feel free to reference all you like peter
  • turfgnome
    turfgnome over 10 years ago +1
    I have to say you are an great guy here, to post your codes on what I found to be the hardest component to find information about so soon. I will hopefully get my board today and test the codes I wrote…
  • fvan
    fvan over 10 years ago +1
    Well done Peter! Great work and so fast already!
  • Robert Peter Oakes
    Robert Peter Oakes over 8 years ago in reply to Former Member

    If you click on the main title i will take you to the full post, you should find them at the end of the post as downloadable attachments

     

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to fvan

    Where is the actual library.zip file?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • matfur92
    matfur92 over 10 years ago

    Great job Robert Peter Oakes , thanks so much for sharing this solution! image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 10 years ago

    Great job, Peter.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 10 years ago

    Well done Peter! Great work and so fast already!

    • Cancel
    • Vote Up +1 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