Show Posts
|
|
Pages: [1] 2 3 ... 67
|
|
3
|
Using Arduino / Programming Questions / Re: OpenMusic Labs FFT Help
|
on: April 16, 2013, 06:48:08 pm
|
Oh duh, even after all this time, I forget to post the corresponding code /* fft_adc.pde guest openmusiclabs.com 8.18.12 example sketch for testing the fft library. it takes in data on ADC0 (Analog0) and processes them with the fft. the data is sent out over the serial port at 115.2kb. there is a pure data patch for visualizing the data. */
#define LOG_OUT 1 // use the log output function #define FFT_N 256 // set to 256 point fft
#include <FFT.h> // include the library
void setup() { Serial.begin(115200); // use the serial port TIMSK0 = 0; // turn off timer0 for lower jitter ADCSRA = 0xe5; // set the adc to free running mode ADMUX = 0x40; // use adc0 DIDR0 = 0x01; // turn off the digital input for adc0 }
void loop() { while(1) { // reduces jitter cli(); // UDRE interrupt slows this way down on arduino1.0 for (int i = 0 ; i < 512 ; i += 2) { // save 256 samples while(!(ADCSRA & 0x10)); // wait for adc to be ready ADCSRA = 0xf5; // restart adc byte m = ADCL; // fetch adc data byte j = ADCH; int k = (j << 8) | m; // form into an int k -= 0x0200; // form into a signed int k <<= 6; // form into a 16b signed int fft_input[i] = k; // put real data into even bins fft_input[i+1] = 0; // set odd bins to 0 } fft_window(); // window the data for better frequency response fft_reorder(); // reorder the data before doing the fft fft_run(); // process the data in the fft fft_mag_log(); // take the output of the fft sei(); Serial.println(255); // send a start byte Serial.write(fft_log_out, 128); // send out the data } }
|
|
|
|
|
4
|
Using Arduino / Programming Questions / OpenMusic Labs FFT Help
|
on: April 16, 2013, 06:08:21 pm
|
|
Hello,
I'm using OpenMusic Labs' fft_adc code to try and do some FFT on my music. The only change is i've changed serial.write(255) to serial.println(255)
My question is why arent my values changing? I have ADC0 connected to the right pin of my TRRS breakout from sparkfun and then I have ring 2 of the same breakout connected to ground.
My current output looks like the image attached
|
|
|
|
|
5
|
Using Arduino / LEDs and Multiplexing / Re: My RGB LED Stairs Illumination video
|
on: April 16, 2013, 12:35:13 pm
|
Here is a photo of the breadboard design:
That's the most colorful breadboard design I've ever seen :-) Beautiful. I bet it's going to make you feel heavy-hearted when you have to pull it apart ;-) Pulling those things apart always sucks. Anyway, Cranium, has there been any updates to your project?
|
|
|
|
|
9
|
Using Arduino / LEDs and Multiplexing / Re: Pin 13 LED
|
on: April 11, 2013, 10:43:26 am
|
Thanks Lefty, must have drempt it!  No you did not dream it, it's one of the most common errors around on the net. Back in 2006 ( I think ) there was a resistor in series with this pin so you could do that. However it screwed up using SPI so it was dropped. The concept however remains mainly propagated by people who do not understand what they are doing. I have seen in in several published books telling me, and everyone else, that the authors are idiots. Hm, that explains my first book then, haha.
|
|
|
|
|
13
|
Using Arduino / General Electronics / Serial monitor FHT output help
|
on: April 09, 2013, 05:48:54 pm
|
Hello, I have a favor of somebody. I have uploaded the fht_adc example program here http://wiki.openmusiclabs.com/wiki/ArduinoFHT to my arduino leonardo. My problem is my laptop isn't fast enough or whatever to process the information coming in through the serial monitor as is. So I'm wondering if somebody could post the output of their serial monitor using this code. It comes in on 115200 baud. Or if anybody has a solution to this, lemme know. Thanks!
|
|
|
|
|
14
|
Using Arduino / LEDs and Multiplexing / Re: My RGB LED Stairs Illumination video
|
on: April 03, 2013, 11:18:00 pm
|
|
Sorry for my late response, I'm freaking out with my last non final test at university.
I haven't been able to get them mounted to exactly test them, although through research, It seems that you don't even really need a library for them. They are basically just giant shift registers except instead of shifting on or off, you shift specific values between 0 - 1023 or w/e it calls for. Then you just latch the values in and bam, you got purple or w/e is connected to the channels.
Only problem is that if you put a lot of chips in the daisy-chain line, then you may need a faster processor depending on how fast you want to update the values
|
|
|
|
|