Motion Sensor

The Motion Sensor sample project implements a motion sensor on the NI myRIO. This sample project uses the onboard accelerometer to detect motion and displays the amplitude using the LEDs on the NI myRIO.

System Requirements

Development System

Hardware

Overview

This sample project uses a Flat Sequence structure that executes the following three frames from left to right:

  1. Initialize—Initializes a Boolean array that represents the four onboard LEDs.
  2. Acquire and process data—Acquires the motion signal from the onboard accelerometer and turns on onboard LEDs to display the amplitude. The While Loop repeats the code until you click Stop or an error occurs.
  3. Close—Resets the hardware output values to zero before the application exits.

Running This Sample Project

Complete the following steps to run this sample project:

  1. In the Project Explorer window, open and run Main.vi.
  2. Observe the LED Status indicator for the amplitude of the motion signal from the onboard accelerometer.
  3. Click Stop to stop the application.

Additional Resources

Refer to the LabVIEW Help, available by selecting Help»LabVIEW Help from LabVIEW, for information about LabVIEW concepts or objects used in this sample project. You also can use the Context Help window to learn basic information about LabVIEW objects as you move the cursor over each object. To display the Context Help window in LabVIEW, select Help»Show Context Help.

This sample project is based on the myRIO Project template. Refer to the myRIO Project template and its documentation, available from the Create Project dialog box, for information about how the template works.


Legal Information

Copyright

© 2014 National Instruments. All rights reserved.

Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.

National Instruments respects the intellectual property of others, and we ask our users to do the same. NI software is protected by copyright and other intellectual property laws. Where NI software may be used to reproduce software or other materials belonging to others, you may use NI software only to reproduce materials that you may reproduce in accordance with the terms of any applicable license or other legal restriction.

End-User License Agreements and Third-Party Legal Notices

You can find end-user license agreements (EULAs) and third-party legal notices in the following locations after installation:

U.S. Government Restricted Rights

If you are an agency, department, or other entity of the United States Government ("Government"), the use, duplication, reproduction, release, modification, disclosure or transfer of the technical data included in this manual is governed by the Restricted Rights provisions under Federal Acquisition Regulation 52.227-14 for civilian agencies and Defense Federal Acquisition Regulation Supplement Section 252.227-7014 and 252.227-7015 for military agencies.

IVI Foundation Copyright Notice

Content from the IVI specifications reproduced with permission from the IVI Foundation.

The IVI Foundation and its member companies make no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The IVI Foundation and its member companies shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.

Trademarks

Refer to the NI Trademarks and Logo Guidelines at ni.com/trademarks for information on National Instruments trademarks. Other product and company names mentioned herein are trademarks or trade names of their respective companies.

Patents

For patents covering the National Instruments products/technology, refer to the appropriate location: Help»Patents in your software, the patents.txt file on your media, or the National Instruments Patent Notice at ni.com/patents.