Show Posts
Pages: [1]
1  Using Arduino / Installation & Troubleshooting / Re: Uno with Debian Linux - not uploading program on: February 04, 2013, 11:01:47 am
Ahh..

I was running an old version of the IDE - I've since upgraded to Debian Wheezy, and voila! All is well.. Able to install the new IDE straight from the synaptic package manager.

I had to add my user to the 'dialout' group, but once I did that, I had access to the serial port..


Back in business!

C
2  Using Arduino / Installation & Troubleshooting / Uno with Debian Linux - not uploading program on: February 03, 2013, 10:28:41 pm
Hi,

I'm trying to get my Uno to work in Debian 6.0 (latest build)..

For some reason there's no option for an Uno in the Board menu - i'm trying to program it with the Duemilanove setting for now.

I'm getting the error 'Programmer is not responding'. The board is fine, as I checked it with my mac.

Does anyone know how to get an Uno to work with Debian Linux? Or where to find the Uno setting in the board menu?

Cheers,

Carl
3  Using Arduino / Programming Questions / Re: setting digital/analog pins by binary on: January 25, 2013, 11:39:44 am
Haha! So simple I didn't think of it!  smiley-yell
4  Using Arduino / Programming Questions / setting digital/analog pins by binary on: January 25, 2013, 11:36:23 am
Hi!

I've got a little system where one Arduino is controlling another. It does this by communicating in binary over 6 digital pins - D8 to D13 (PORTB), and then two analog pins as digital (A5, A4).

I had a clumsy setup where I was switching on each pin separately, but then I read about using PORTB = Bxxxxxxxx  (where the x's are binary).

So how can I convert a simple decimal number between 1 and, say, 64 - into a binary number I can use with the PORTB command?

And also, what is the port address for Analog pin 5 and 4?


Cheers!

Carl

5  Using Arduino / Audio / Re: Setting two pins to fast PWM on: January 23, 2013, 06:06:57 pm
I just tried this but it's not working.. Still no sound on pin 11,,
6  Using Arduino / Audio / Re: Setting two pins to fast PWM on: January 23, 2013, 04:38:53 pm
in the end, I just put analogWrite(11, outputvalue) - it works, but it's really clumsy and a little too slow.. Surely some of you clever people out there know how to address pin 11 by it's memory address?

  smiley-wink
7  Using Arduino / Audio / Setting two pins to fast PWM on: January 23, 2013, 03:21:08 pm
I'm building a wavetable VCO - and I found this code to set pin 3 to fast PWM (for the audio output):

Code:
#define PWM_PIN       3
#define PWM_VALUE_DESTINATION     OCR2B
#define PWM_INTERRUPT TIMER2_OVF_vect

TCCR2A = _BV(COM2B1) | _BV(WGM20);
TCCR2B = _BV(CS20);
TIMSK2 = _BV(TOIE2);

and then the interrupt timer does this..

Code:
PWM_VALUE_DESTINATION = outputvalue;
outputvalue = (((uint8_t)(osc.amplitude>>8)) * pgm_read_byte(sintable+((osc.phase>>16)%LUTsize)))>>8;

Alas though, I don't really understand this! And what I want to do is get a second PWM pin to do exactly the same (to create a second oscillator) -
I read that pin 11 can also be set to fast PWM..

Does anyone know the code to implement this?


Carl
8  Using Arduino / Audio / Re: MIDI problems with PWM audio generator on: January 22, 2013, 04:43:42 pm
I just tried disabling the interrupt and the MIDI works fine.. Guess I'll have to look at trimming back the interrupt code.. Unless there's a way to buffer the serial data from within the interrupt and check that?
9  Using Arduino / Audio / MIDI problems with PWM audio generator on: January 22, 2013, 04:25:46 pm
Hi..

I'm struggling with something - I'm working on an Arduino oscillator.. I'm using Adrian Freed's audio generator code (http://adrianfreed.com/content/arduino-sketch-high-frequency-precision-sine-wave-tone-sound-synthesis

I'm not sure if it's because the interrupt is hogging resources, but I can't seem to receive any MIDI data at the serial port..

I'm using the MIDI library - i've tried parsing MIDI.read in the main loop - and it doesn't work. I also tried it from within the interrupt, and even tried a counter that calls MIDI.read every 'x' number of cycles so the serial buffer has time to fill up, but it's no good.


Does anyone know a way to fix it? Perhaps I need to set up a separate interrupt just for MIDI - I know the audio code uses TIMER2, but I don't know how to make another interrupt..

Any thoughts would be greatly appreciated, I'm pulling my hair out!

Carl
Pages: [1]