Use the accelerometer of the playbook

Hey guys,.

I'm relatively new to programming for the playbook, and I want to use the accelerometer to control an object on the screen (a sprite as3 or form)

Basically, I have no idea where to start when including the accerometer and its use in the code

Any help will be appreciated

Thank you

Chris

That the orientation of the three axes is also covered by the docs.  X axis runs from left to right, are between the top and bottom and Z along a line that crashed across the screen...

(Edition, exchange of X and Y what I said originally.)

Tags: BlackBerry Developers

Similar Questions

  • Accelerometer (voltage) of the signals using the module NI6361 (PXI)

    Hi guys,.

    I posted this question once again, but I still have problems with the acquisition of data. I'm acquiring a voltage signal by using an accelerometer module and single voltage NI6361. I would like to set up the accelerometer to measure a range of signal between + / 5000g.

    The accelerometer sensitivity = 0,516 mV/g where

    1 g = 0,000516 Volts or

    1938-g = 1 Volt or

    5000 g = 2.58 Volts

    -J' left the signal conditioning with +/-10 Volts (despite the fact that there is another option value +/-5 Volts as well)-please see attached pdf

    -I entered the units sensitivity to g

    -J' put labview to measure a signal between +/-10 Volts to the single a complete axis accelerometer.

    -An oscilloscope was related to the card, and she won the same vertices with the LabVIEW. -Please see attached pdf

    -By knocking gently on the accelerometer, the recorded signal was 400 mV = 0.4 V where he gives an acceleration of 775g.

    -L' accelerometer is also fixed on the ball for a shock test fell from a distance of 50 mm. The recorded acceleration was 4000g which is quite high for such a small distance. I expect an acceleration of about 200g of 2 to 4 meters according to some documents as well.

    Can you please give me any help on the way in which the parameters are specified correctly between the accelerometer and the coupler? I'd appreciate it highly if you can correct me if anything of the above statement is false. I have attached a PDF for your convenience.

    Kind regards

    Since gain is the scale factor for tension, you must divide your results by the gain.

    g = voltage / (sensitivity * win)

  • How can I use an accelerometer on a cRio 9012 with the NI 9233 module?

    I'm putting in place a system of vibration using a search of wilcoxon accelerometer 797-33. Is there some setting you have to light to light the target NOR?

    I used the getting started with the example of 9233 as base. However, it will only read 0, while the vi is running

    The power of the module 9233 is always.  Its successor, the 9234 contains options to be turned off, and by default the 9234 is turned off.  So with the 9233, is always under tension.

    You can watch the specific\NI LabVIEW\examples\compactRIO\module 9233 examples for some ideas on coding.

  • Cannot use the WebGL with PlayBook frame buffer

    I went through the lessons on http://learningwebgl.com/lessons/, but could not get the demo 16 lesson to display on my PlayBook (OS 2.1.0.840). I find myself with an empty white canvas. The demo works fine in Chrome. According to the Documentation of WebGL Blackberry , I think that the functions of WebGL used in the demo are all supported. According to the web Inspector, there is no error on the page.  Does anyone know why it does not display the Web? My guess is that the problem revolves around a problem memory frame buffer that I was not able to get any frame buffer code to render on the PlayBook. Anyone used framebuffers successfully on a PlayBook?

    Thank you!

    Hello.

    Are you a person performs the lessons in the browser or they packaged in an application? I tried here, with the PlayBook on OS 2.0.1.358 and it seems to work well in the browser as shown in the screenshot below. The first was the notification that the page uses WebGL, so I need to give permission and then it worked really well on the device!

  • Licenses in common/dynamic: all the PlayBook apps use it yet?

    I'm curious to know if anyone uses licenses either grouped or dynamic models in their PlayBook application, even if you are totally ignorant in the application itself.

    In other words, you configured license model for your application in the portal provider to be either people?

    In the affirmative, please let me know what the app is so I can buy and download it (preferably not an expensive application ).  I'm interested in looking at the content of the app folder in archive (since RIM has kindly put trivial for it) to see if there is something in there that represents the license key data.  (I checked about 100 applications so far and none have resorted to these licensing models, but mostly I just checked in free applications.)

    If this information is displayed, it should be possible to recover in the application and use it to "close the loop" on this license thing and actually start to use this mechanism to protect against piracy.  It would also largely irrelevant that our applications are completely exposed in backup archives for now.  (After all, when was the last time you used the software on a PC which can not examine in detail, if you were so inclined?)

    Okay, so I finally found the license key in the PlayBook.

    As mentioned earlier, at first, I was using my sandbox account to buy the app, and although the key appears immediately after download, it seems not be stored anywhere.  (She was also the license key delivered to the original purchaser of the application according to the portal provider report of purchase, but that's a story for another time.)

    I've disabled my sandbox account and tried again.  As mentioned, this time, that the license key appears whenever I run App World and let me easily tap to copy to the Clipboard.

    I wouldn't be hard to have a user that and stick it in a field in my application to activate it, if I were to add such a feature.  It may take a bit of practice for them to do, and I could very well imagine that support costs could be quite high, because many users would not probably has an idea how to follow instructions.  RIM: this should really be improved with an API!

    Anyway, I did another backup for DM and looked at the archives.  This time I was able to find the license key in the backup, if it is not in the folder of my own app.  I won't go into the details here... it benefits no one.

    I don't see that there is no way for our applications retrieve this information programmatically, so for now we seem to depend on the user action manual, which sucks, but at least gives us a step in the right direction.  For an application with sufficient value to justify the cost of implementation of this and support/training/mothering users through the technique of the copy/paste the license key, it is at least technically feasible now for use as a method for the best protection against copying.

  • problem in using the accelerometer in my game

    Hi, I am new to AS3 and I create a game for android using the accelerometer.

    the game:

    the player needs to collect coins and throw bombs by moving left right.

    code:

    I took the code frome the extracts of 'code' that offer Flash and make a little change.

    var fl_Accelerometer:Accelerometer = new Accelerometer();

    fl_Accelerometer.addEventListener (AccelerometerEvent.UPDATE, fl_AccelerometerUpdateHandler);

    function fl_AccelerometerUpdateHandler(event:AccelerometerEvent):void

    {

    itamar_a.x = event.accelerationX * 130;

    }

    the problem:

    When the player loses and he gose back to start the game - the speed of the drive has become higher and higher.

    After some tests, I can't control the player because of the very high speed.

    I hope I was clear... Please help!

    Try:

    If (itamar_a.hitTestObject (bomb)) {}

    fl_Accelerometer.removeEventListener (AccelerometerEvent.UPDATE, fl_AccelerometerUpdateHandler);

    gotoAndStop (3);

    itmar_a.y = 1500;

    }

  • Use the accelerometer to control movement?

    Hello.

    Is it possible through edge animate using the accelerometer on an iPad to control the movement of a symbol?  I want to create a scene where a fish moves on a sub sea scene when the user toggles the ipad.

    Thank you

    Ben.

    Hi, Ben.

    The answer is "sort of".  We have all the native user interface to help you use the accelerometer events, but you can do it using JavaScript using the DeviceOrientation event.  Please note that this is not supported in mobile web browsers.

    http://caniuse.com/#search=deviceorientation

    http://www.html5rocks.com/en/tutorials/device/orientation/

    I hope this helps point you in the right direction!

    -Elaine

  • How to use the trigger for Hammer

    Hello

    I used a hammer and an accelerometer of pcb to do some tests of beam. I want to express signal for start of log data after I use the hammer hit something. Here is my configuration in express signal.

    Trigger type: analog edge. Source of relaxation: the channel of the hammer
    Slope: fall. Level: 0

    However, once he began to run, it says "logging was stopped because an error occurred with a step in the project. If this error is due to a device buffer overflow, you can improve performance by disabling updates to screen using the "view > views of Signal update during the race" menu item. You can also change the way in which the signals are recorded by changing the Logging Options in the tools > Options dialog box. Disabling "Prepare the log for display data" will greatly improve performance. "I've changed everything, but it didn't work.

    Should I use other types of trigger?

    Thank you
    Ningyu


  • Help with fft vibrations without using the package of noise and vibrations

    I'm looking for help in the analysis of vibrations. I use an example updated NI 9233 VI, to get a signal from the accelerometer for display using a FFT power spectrum. I'm not entirely sure if it works, because it's the first time I've ever done vibration analysis on LabView. So if you could explain a thing or two about vibrations or TFF, I'd be more than willing to hear from you. I have included my code along with a photo of an analysis of vibration of the computer, I work with. (even when I don't know if his work that I just thought it would be good to show an output)

    Brandon

    Data sheet:

    I have LabView 2011

    I FPGA, real-time

    I have a model of research of Wilcoxon accelerometer 797-33

    With an NI 9233

    On a cRio-9012

    Hi Brandon,.

    You can use the FFT Complex (photo attached) to calculate the magnitude of the acceleration at different frequencies. You will need to take a little further to build a new waveform with this release, which includes d0, df and the output of the FFT. In order to calculate the df, please refer to the user manual on page 10-3. With respect to the scale that is output by the FFT, it must be same as input. Hope this helps to answer your questions. Thank you!

    See you soon,.

    CARISA Leal

  • Acquisition of vibration with the NI USB-9234 using the NIDaqMxBase library

    I have a NI USB-9162 linked to a NOR-9234 properly configured and installed under OpenSUSE 11.3. It's the output of ldaq:

    >lsdaq
    --------------------------------
    Detecting National Instruments DAQ Devices
    Found the following DAQ Devices:
    NI USB-9234: "Dev1"    (USB0::0x3923::0x72B5::0164852A::RAW)
    --------------------------------
    

    I'm developing a simple application to acquire the values of vibration of a project connected with an accelerometer.
    We start from the example of acquireNScans - AnlgStart.c of NIDaqMxBase 3.4.5 documentation.

    Unfortunately, the program fails and generates the following error:

    "DAQmxBase Error -200428: Value passed to the Task/Channels In control is invalid."
    

    Then I realize that the NI9234 doesn't support analog and digital triggers so I have decided to try with the acquire1Scan.c (a scan without triggering):

    int main(int argc, char *argv[])
    {
        // Task parameters
        int32       error = 0;
        TaskHandle  taskHandle = 0;
        char        errBuff[2048]={'\0'};
    
        // Channel parameters
        char        chan[] = "Dev1/ai0";
        float64     min = -10.0;
        float64     max = 10.0;
    
        // Timing parameters
        uInt64      samplesPerChan = 1;
    
        // Data read parameters
        float64     data;
        int32       pointsToRead = 1;
        int32       pointsRead;
        float64     timeout = 10.0;
    
        DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));
        DAQmxErrChk (DAQmxBaseCreateAIVoltageChan(taskHandle,chan,"",DAQmx_Val_Cfg_Default,min,max,DAQmx_Val_Volts,NULL));
        DAQmxErrChk (DAQmxBaseStartTask(taskHandle));
        DAQmxErrChk (DAQmxBaseReadAnalogF64(taskHandle,pointsToRead,timeout,DAQmx_Val_GroupByChannel,&data,samplesPerChan,&pointsRead,NULL));
    
    printf ("Acquired reading: %f\n", data);
    

    Also this program fails and gives this error:

    DAQmxBase Error -200077: Requested value is not a supported value for this property. (Timing Mode)
    

    How can I get at least a single data value of the accelerometer of the device using the NIDaqMxBase API?

    Hi giaulo,

    The examples that you have tried to run are not compatible with your device.

    The 9234 does not support analog triggering, so examples of "acquireNScans" - AnlgStart.c do not work.

    He is also unable to make an acquisition of single point because is based on the architecture of delta-sigma ADC. Here is a knowledge base article explaining the limitation:

    KB 4SU94SH7: DSA Hardware Support a Point Acquisition?

    This is the reason why the "acquire1Scan.c" does not work.

    You will need run one example making an acquisition in the buffer. "acquireNScans.c" would be a good to watch. Be aware of all these examples, the default is +/-10V input range. The 9234 can only input +/-5V, so it will take a few changes. Also as you try to read an accelerometer, IEPE excitement is probably necessary. I've attached an example which is based on the example of "contAcquireNChan.c" that defines the range and allows the excitement for the device correctly.

  • error on the application running on the playbook

    Hello

    I built an application using phonegap, what I have running on other devices, but I built a .bar file and I get the following error when you try to install the application

    failure of 821 request-requires-system: System name not recognized 'BlackBerry 10'

    Ive been looking for oonline and in some forums but I can't seem to find an answer to this question.

    It seems that the BAR file was built for 10 BlackBerry which is a different architecture than the OS of the PlayBook.

    There is here a guide which describes the process of generation for PlayBook:
    http://docs.PhoneGap.com/en/2.3.0/guide_getting-started_blackberry_index.MD.html

    Specifically, you must use the Tablet OS SDK, not the BlackBerry 10 SDK.

  • How the packet data / * ($HOME /) files by using the bar - descriptor.xml

    Hi, using sdk native c / c ++ with playbook Simulator 1.0

    I want to distribute with my application some data files that likely should fall under the ' data /' ($HOME?)

    folder.

    (I've written / will update them sometimes, so app/native/does not appropriate I suppose.)

    in the bar - descriptor.xml, I tried adding them as an 'active '.

    who drops their bottom right in app/native / *.

    so I change the XML .bar to try to get them grounded in data.

    Here's what I found:

    by train: data/filename landed the file in app/native/data/filename

    try:... /... / Data/filename received the error

    by train: / data/filename received the error (hoping to slash leader was compared to the sandbox)

    I even on a lark tried: $HOME/filename, who literally created file app/native / $HOME!

    so he tried a ${HOME} with the curlies. I got an error saying unable to resolve the path variable.

    How can I get the data files in the folder/data ($HOME) using the .bar packaging?

    You cannot package the file into the data, you copy your files at startup, if they don't not exist your app/native/data for example

  • Launch of the URL in the browser of the Playbook

    I must say, this complete package of the Playbook is a fascinating move by RIM. Seems really captured some interest. He certainly got I'm working on my application that I've been a bit lax to watch for a while! Also forced me pick up cocos2d-x in my todo list, as my android app used native code for graphics, so thanks for the help I needed

    In any case, a question which I hit to date can come from my lack of understanding of the Playbook as a device. Is it possible (and it's a workflow accepted) for launching native browser of the Playbook since an application SDK? So if I want to link my dev blog / facebook page / G + page / whatsoever of in app I just wish I could call some URL launches the function. If it's in the docs I apologize, but I look through and cannot see an obvious reference to this type of action.

    Function called navigator_invoke draws bps

    See docs here

    https://bdsc.webapps.BlackBerry.com/native/beta/reference/com.QNX.doc.bps.lib_ref/com.QNX.doc.bps.Li...

  • Porting an existing application from the PlayBook to BB10

    I have a question Portage.  I think I'm ready to download an App from App World.  Please let me know if I missed a step.  Here's what I did with an existing application of the PlayBook - I downloaded and installed the "BlackBerry 10 SDK for Adobe AIR beta 3" in my Flash Builder.  Also, I requested, received and installed the new code signing for the BlackBerry PlayBook OS, BlackBerry 10 and upper keys.  I recompiled the program with the new SDK BB10 and the new code signing keys. The program works well on my PlayBook and in the emulator.  I guess that everything that I have to do now is download the app on App World.  Who is?

    Why the new signing keys? If it's just an another update of an existing application to the PlayBook, you must use the same keys.
    Did you use an icon of 150 x 150 and redo your screens of the new device size slash?
    You resize the goods correctly for the increase of almost 2 x the pixel density?

  • Test app is in contradiction with the original app in the playbook

    I created an application using webworks for BB10, tried to test on the book of game, installed through BlackBerry Tablet OS chart Help, he worked for another POC, created a new test application using the same file config.xml (that changed the Id and version), after the test I deleted the application of test of the playbook, changed my original, installed in the playbook app , it has installed but... When I click the icon, the old test application open! ??? What could the problem? How to solve?

    Ooops... config.xml: did not...

Maybe you are looking for

  • iPad actions affect also the imac

    One of our ipads works very slowly (it uses IOS 8.0.2) and I thought I want to clear the history/cache to see if that would help to expedite. It didn't, but what I also found was by disabling the historic safari there navigation also allowed on our i

  • Firefox is unbearably slow after update (/ questions/985969)

    Firefox slows and raises my CPU at 100% after a few hours of use. This happened again and again after that I updated Firefox Versions 27, 28 and 29 now. If I restart my computer, Firefox works normally for a while before it slows down again. Same tex

  • Why can't subscribe me to RSS feeds with RC2?

    I can't do crap with RSS feeds since installing 4.0 RC2. Live Bookmarks button "subscribe to this Web page...". "does nothing but to refresh the page. Clicking on a link to the workflow does nothing, and RSS reader addons will not find all the food e

  • iCloud email email wrong display

    Hello I have earlier you have this problem and I don't know why. Basically, I changed my email account icloud a year ago and it has also changed in my mail app and if everything worked fine. However, now for some reason, if I had to send one of my e-

  • HP Pavilion Notebook 15p204tx: Realtek RTL8723BE does not

    Hello I was faced with a problem with my Realtek RTL8723BE wireless card for more than a month. After using it for awhile, I am unable to connect to the internet. The connection status indicates "No Internet Access". After you run the troubleshooter,