Hi everyone !
I am trying to create a simple vibration analysis device with an arduino and a 3 axis accelerometer (DE ACCM3D).
The basic principle is to collect data from the ACCM, store it in the EEPROM and run an FFT (Fast Fourrier Transform) through it in order to have a idea of the spectrum of the vibration. I have found quite a similar project here :
But I can't seem to be able to run it ! When I try to run the Pde, I get :
FFTvisualizer.pde:-1: error: variable or field 'serialEvent' declared void
FFTvisualizer.pde:-1: error: expected `)' before 'myPort'
FFTvisualizer.pde:-1: error: 'import' does not name a type
FFTvisualizer.pde:-1: error: 'Serial' does not name a type
FFTvisualizer.pde:-1: error: expected unqualified-id before '[' token
FFTvisualizer.pde:-1: error: 'PFont' does not name a type
FFTvisualizer.pde:-1: error: 'PImage' does not name a type
FFTvisualizer.pde:-1: error: expected unqualified-id before '[' token and so on .......
Any idea ? Also, any suggestion on how to modigfy the project for frequencies ranging from 1 to 50Hz ?
Thank you for reading !
It sounds like the library has not been installed or it is an old one from before version 1.
To correct an old library you can try adding these lines to it:-
Library correction:-
If you can do that on an Arduino it'll be pretty impressive. It sounds like that sort of problem that needs storage and processing speed, neither of which are Arduino's strong points.
I think, mentioning EEPROM is misunderstanding, as usually size of EEPROM even smaller than RAM, plus access time pretty slow, so there is no point in storing something in this type of memory, except some configuration data that need to be restored after power failure.
Regarding speed of arduino board, it's quite fast to do a voice processing, 8 kHz both direction (FFT / iFFT): http://coolarduino.wordpress.com/2012/04/09/voice-pitch-shifting-scrambler/
so vibration with 50 Hz is looks like a piece of cake. To properly scale frequency range, you should modify timers settings, if don't know how, time to dig into datasheet -):