| Arduino Forum ::  Members :: aboyne
 Show Posts Pages: [1]
 1 Forum 2005-2010 (read only) / Development / Re: Detecting specific motions using accelerometer on: July 27, 2010, 12:22:30 pm I tried something fairly similar to that code, but gravity is kind of messing me up. I have some rotation when I am doing the motions, and that means that gravity starts to act on different axis in the middle of a motion. Back to the drawing board.
 2 Forum 2005-2010 (read only) / Development / Re: Detecting specific motions using accelerometer on: July 26, 2010, 12:22:48 pm I don't know if I posted this in the wrong place, please let me know if I did. I have been thinking about this problem, and have a bit of an idea of what I want to do.First step would be to detect the direction of a voluntary motion. To do this I was thinking of the following (in sudo code).Code:threshold = # (how much the force needs to change before it is considered voluntary)vals = readSensorinit_x = vals[xforce]init_y = vals[yforce]init_z = valz[zforce]vals = readSensorx = vals[xforce]y = vals[yforce]z = valz[zforce]diff_x = x-init_xdiff_y = y-init_ydiff_z = z-init_zif(diff_x>threshold): #Moved rightif(dir_xthreshold): dir = #Moved upif(dir_ythreshold): #Moved forwardif(dir_z
 3 Forum 2005-2010 (read only) / Development / Detecting specific motions using accelerometer on: July 23, 2010, 01:27:15 pm Hey all,I am going to soon begin trying to recreate one of these: http://www.thewandcompany.com/ using an arduino. This is my first project with arduino, so I will be starting slow by first just creating a setup that can learn and reproduce IR signals. I feel like I can handle this part, but the accelerometer has been making me a little more nervous.I want to have at least 5 basic motions, flip up (volume up), flip down (volume down), right flick (channel up), left flick (channel down), and flick up & down (power). Has anyone worked with detecting these motions? I do not have my arduino or components yet, but I am just thinking ahead of time.Thanks.
 Pages: [1]