12-06-2016 08:55 AM - edited 12-06-2016 08:55 AM
Project:
So I am working on a project that will control a TV with an accelerometer(hand gestures) but my issue is that when I jerk the accelerometer in one direction, the signal generated has two peaks.So jerking the accelerometer in the +x direction produces first a signal that corresponds to the positive x direction and then a signal that corresponds to the negative x direction. I cleaned the signals up with highpass filters and had the four signals(+x,-x,+z,-z) then go into Labview from from a d-flipflop.
Problem:
Basically what I want from labview is to take in the first signal it recieves and to reject the secondary signal (or any signal for the next 500ms). I need labview to be able to differentiate between left and right, up and down, and to be able to send these signals to an arduino that will transmit the signals to the TV. It appears to be a simple task but I cant seem to get the code working properly.
Troubleshooting:
At first I used a flat sequence structure hoping that as soon as it received the first signal it would reject any other incoming signals for 500ms. The code seemed too slow and very occasionaly it would not work.
I also attempted to use an event structure and the Daqmx Stop task VI again attempting to prevent the secondary signals from triggering a specific task. I included the code for this.
In another attempt I used a case structure but from this the NI myDAQ didnt seem to receive the signals.
12-06-2016 04:55 PM
This is Physics. Think about what a "positive" acceleration means ("speeding up"), and what a negative acceleration means ("slowing down"). What movement would you like to make that has only "speeding up" without "slowing down"? That's pretty difficult to do -- you can do it briefly by jumping off a bridge (you'll "speed up" for a while, but then, Splat!).
Bob Schor
12-06-2016 05:00 PM
Sorry, I answered without looking at your VI. Now I'm really confused (having just written some code using a triaxial accelerometer) -- you seem to be reading a single digital bit for your four accelerometer signals, whereas I read three analog voltages. Maybe we are using different kinds of accelerometers?
But my comments about "What Goes Up (Usually) Must Come Down" still, I think, applies.
Bob Schor