Playback pattern sequences, C/C++ Programming

This task involves creating a new class(es) that will allow the system to playback pattern sequences using the Neo  Freerunner  hardware. The first thing to note is that the vibrator is treated similarly to how the phone views LEDs, meaning that the intensity of the vibration is determined by a number from 0 to 255 (brightness). Hardware on the Neo Freerunner can be read or written to by accessing special system files. The 'files' to access this hardware can be found in (these are easy-access symlinks): 

/sys/class/leds/

In this directory you will find several special files  that can  manipulate  its physical functionality (Linux: Device Files). An example of how to "Pulse" the Neo vibrator can be found inside the function SetVibrateNow within open source file:

/devel/qt-extended-4.4.2/devices/neo/src/plugins/phonevendors/neo/vendor_neo.cpp

The sample pattern files provided use the format of specifying the strength (0-255) and duration (milliseconds) of a single 'note' on each line of the file. For example, a file with:

150,1000
0,500

This means that the hardware should activate at a strength of 150 for 1sec, followed by nothing for 0.5secs. In the case of the LEDs, as there are three LEDs - the pattern file will be formatted as follows:


1,0,1,255,1000
1,0,0,255,500
1,1,1,0,1000 or 0,0,0,x,1000 (x can be anything)
1,1,0,255,1000

This means that, blue and red leds activate for 1sec, blue remains on for 0.5sec, no activity for 1sec, followed by purple (blue/orange) led for 1 second.

This module should only exist in PhoneBookDialog and can only be accessed by other classes using signal and slot connections made in PhoneBookDialog. 

Posted Date: 2/22/2013 6:14:20 AM | Location : United States







Related Discussions:- Playback pattern sequences, Assignment Help, Ask Question on Playback pattern sequences, Get Answer, Expert's Help, Playback pattern sequences Discussions

Write discussion on Playback pattern sequences
Your posts are moderated
Related Questions
example of program to ad two numbers

Differentiate between functions getch () and getche (). - Both functions accept a character input value from user. - When getch () is used, key that was pressed won't appear

Object Conversions Just like initialization, conversions are also done automatically when an object of a derived class is assigned to an object of the base class. Though, the c

The goto statement This statement can be used to branch to another statement of the program. This is rarely used as it violates the principle of structured programming. Though

How to write a function template A function template should be written at the beginning of the program in the global area, or you may place it into a header file. All function

BACKGROUND: FILE SYSTEMS  In a computer, a file system (sometimes written filesystem) is the way in which files are named and where they are placed logically for storage and ret

Explain the Function Prototype? The Functions must be declared before they are used, ANSI C provides for the new function declaration syntax called as the function prototype,

Explain the parts of operators Assignment Operators The equal (=) sign is used for assigning a value to another. The left hand side has to be a variable (lvalue, which exc

The Preprocessor Directives A preprocessor directive which starts with a hash '#' ,is an instruction to the preprocessor, which acts on the source code before the compilation p

I need Asp .net Facebook app project completion Project Description: We are urgently seeking a few remaining items to be completed, and the project to be deployed to live.