Loading...
  Show Posts
Pages: [1] 2 3 ... 67
1  Using Arduino / Programming Questions / Re: OpenMusic Labs FFT Help on: April 16, 2013, 07:13:45 pm
Okay, i'll switch it back.

Looks like I gotta figure out how to use pure data!
2  Using Arduino / Programming Questions / Re: OpenMusic Labs FFT Help on: April 16, 2013, 07:05:40 pm
Because I wanted the output on the serial monitor print the different outputs on a new line.

Does that change affect the operation of the code?
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

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?
6  Using Arduino / LEDs and Multiplexing / Re: My RGB LED Stairs Illumination video on: April 15, 2013, 08:10:30 am
How long has it been? OSH usually take 15-20 days for me.
7  Using Arduino / Microcontrollers / Re: ATtiny85 Pin usage on: April 15, 2013, 08:09:47 am
Ohhh, I'm thinking of the aTiny45
8  Using Arduino / Microcontrollers / Re: ATtiny85 Pin usage on: April 12, 2013, 03:57:12 pm
Can you use the 84 like the 85?  If i'm thinking properly, the 84 only has like two PWM pins.
9  Using Arduino / LEDs and Multiplexing / Re: Pin 13 LED on: April 11, 2013, 10:43:26 am
Thanks Lefty, must have drempt it! smiley-eek
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.
10  Using Arduino / LEDs and Multiplexing / Re: Need help: 2 TLC5940 Arduino problem on: April 11, 2013, 10:41:07 am
Sounds exactly like you have a Vcc and GND connection swapped. 
11  Using Arduino / General Electronics / Re: Serial monitor FHT output help on: April 09, 2013, 10:40:00 pm
The thing literally crashes b/c its sending so many things.  the serial monitor won't update fast enough

what kind of bytes, 1-1023? 1-4095?
12  Using Arduino / LEDs and Multiplexing / Re: My RGB LED Stairs Illumination video on: April 09, 2013, 06:10:56 pm
Found this on google http://www.razorconcepts.net/tlc5947.html

It mentions the code here http://webcache.googleusercontent.com/search?q=cache:http://www.razorconcepts.net/files/tlc5947.txt

It looked pretty crappy so I took the liberty to put it in a sketch although I haven't verified it b/c I have yet to buy a toaster to make my circuit boards to use these chips.  I've attached the file.

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
15  Using Arduino / LEDs and Multiplexing / Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver on: April 03, 2013, 11:13:57 pm
Oh wow! Did you make those glasses yourself?
Code, codeeeeee
Pages: [1] 2 3 ... 67