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
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#046 – “Paint The Night” Accelerometer Example
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 9 replies
  • Subscribers 26 subscribers
  • Views 2566 views
  • Users 0 members are here
  • 100projects
Related

PSoC 4 Pioneer Kit Community Project#046 – “Paint The Night” Accelerometer Example

cy.wbz
cy.wbz over 12 years ago

Hello!


We took yesterday off due to the US holiday. The 4th of July US holiday is typically characterized by fireworks in the night sky. Today our example will show you how to create your own fireworks in the night’s sky using the RGB LED. In this example uses a sparkfun 3 axis accelerometer and the PSoC 4 Pioneer kit. We use the accelerometer and the movement of the Pioneer kit to change the colors on the RGB LED.

 

image

 

image

 

This project uses our new Component Pack 6 release of PSoC Creator 2.2 SP1. Please take a look at our earlier post on this new release:


http://www.element14.com/community/message/82153

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Zip File of Images
    • Project Schematic
    • Component Configurations

 

Components Used:

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • PWM
  • UART
  • I2C
  • CyClock
  • CyPin

 

The components are configured by right clicking on the component in your Top Design schematic view and selecting Configure. Please enable the following selections in the Configuration windows for the listed components above.

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.

 

In the example we are communicating to the accelerometer via an I2C interface. This interface will report the positioning on the three axis. This value is then translated into color values on the RGB LED. We use the LED RGB source files used in some of our earlier examples, like example #019. These files give us easy API access to the RGB LED. Make sure you copy those files into your example.

 

We then report the 3 axis positioning over the UART bridge so it can be reported up to the Bridge Control Panel. We are able to chart our positioning in real time using the chart features. You can use the following Bridge Control Panel command to read out the values from the PSoC 5LP USB-UART bridge:

 

RX8 [h=43] @STATUS @1X @0X @1Y @0Y @1Z @0Z

 


image

 

Hardware Connections:

 

You will need to solder on a male connector to the sparkfun 3 axis accelerometer. The header will be connected into the Pioneer board Arduino headers. Connect the accelerometer into header J3 using Pins 1-6. Ground should be pin 1. Please be very careful when plugging this in as you might reverse the polarity on the power and ground connections and hurt your accelerometer. Please see the below image for the correct orientation.

 


image

 

Test Your Project:

 

Connect the 3 axis accelerometer board to the Pioneer kit. Program the kit and begin waving the kit around to see the RGB LED change. If you are interested in creating similar long exposure photos using a DSLR camera, take a look at the following video.

 

image

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
6813.Project Images.zip
KIT042_Accelerometer_LightPaint.cyprj.Archive01.zip
  • Sign in to reply
  • Cancel

Top Replies

  • jesusantoniocar
    jesusantoniocar over 12 years ago +1
    Hello Matt. Thanks for this project. Another application for our psoc 4 pioneer kit. amazing.... best regards, Jesus Antonio.
  • Former Member
    Former Member over 12 years ago +1
    All, Thanks for expressing your enthusiasm! This was a very fun project to work on. I'm working on another with the accelerometer that should be a little more application focused. For now, enjoy these…
Parents
  • DAB
    DAB over 12 years ago

    Hi Matt,

     

    Has anyone done a comparison between the 3-axis accelerometer verses a capacitive change sensor array?

    Given the sensitivity of the Capacitive inputs to movement in the Theramin example, a combined project to look at the position information with both sensor types could lead to some interesting implementation options for the Psoc4 board.

     

    Just a thought,

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • DAB
    DAB over 12 years ago

    Hi Matt,

     

    Has anyone done a comparison between the 3-axis accelerometer verses a capacitive change sensor array?

    Given the sensitivity of the Capacitive inputs to movement in the Theramin example, a combined project to look at the position information with both sensor types could lead to some interesting implementation options for the Psoc4 board.

     

    Just a thought,

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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