Show Posts
Pages: 1 2 3 [4] 5
46  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: 'midi in" project.... on: August 28, 2008, 07:20:42 am
hi guys,
i just got an arduino two days ago in hopes of making a midi -> din sync, cv/gate, and dcb converter.  i have midi in to cv/gate and din sync working.  
/* MIDI to CV/Gate converter

Error in HZ due to 256-bit resolution of PWM (f_desired - f_synthesized)
         0  A0
    0.0988  A#0
   -0.2105  B0
   -0.1113  C1

Hey, cool idea, doing it with PWM! But how audible is the Hz error in the upper octaves? Has anybody meassured the real errors using a 10bit DAC chip or high accuracy resistor ladder version?
I guess the errors would stay easily below 1% even on a 0-10V range... I'd like to emulate smooth  glides/portamento with an analog feeling smiley How good are commercial MIDI to CV converters?

Cheers, Oli, planing to build a MIDI/CV converter for his tenorion :-D
47  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Can I load a program in Arduino without the IDE ? on: January 05, 2009, 03:34:16 pm
when using makefiles, the usually safest method to get a reliable flash procedure is to press the reset button just before you hit "make upload"
does this work for you guys?
48  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: I'm starting to worry... on: November 27, 2007, 09:01:14 am
I perfer this water pressure/amount analogy also.
If you imagine two waterfalls, with an equal width but different heights you have different voltages (higher = more voltage) at the same current (=amount of water falling down). On the other side, if you see two rivers with the same gradient, but one is wider than the other, you have the same voltage at different currents (wider means more current).

This rembers me of my first electronic kits, where transistors haven been discribed as set of two connected water gates. :-)
49  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: Arduino>>MMC interface on: March 12, 2006, 08:34:49 pm
It can be done. Generally. See e.g. the functions in avrlib (it's even allready in a subfolder of the arduino package!)
Or a very nice MMC/SDC C library for AVR micros over here: (sorry, german only)

But if you want to read the card directly on a computer as a standard mass storage device, you have to wirte the data in a certain filesystem description. Something like FAT16, FAT32 etc. I'm pretty shure the Atmega8 has to less flash memory space and RAM for that... I saw working projects with Atmega32's and up, though. (i.e. on the hardware side, FAT filesystem is possible with the wiring board)

Alternatively, you can write your own simple data format. But this requires a custom software, if you want to read the data back on a computer.
Well, all depends on what you want to do with the card, when the data is written. What kind of data will you collect and why on a MMC card?

50  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: fast and precise timer on: March 27, 2006, 12:41:53 pm
I have the same aim. I'm trying to compare the binary patterns from a IR Sensor (the ones with 3 pins: GND, +5V and digital out) gives me  (i have a Yamaha remote).
I set up an external interrupt service routine, that's listening on pin 8 (the only pin that can do that on an arduino board). My first approach was just to count the number of pulses, but it was allways 36 - completley independet form which button I pressed.
So my second attempt was to meassure the time form edge to edge of each pulse. But i still can't distinguish which button get's pressed. I looks like the timing/period of the counting timer is set too short in my case (change of timer1's prescaler could be a solution).
I have not looked into that, I currently suspended this project. See my code only as a rough sketch...

int irPin = 8;
int somethingHappend = 0;

int count = 0;
int timeL;
int timeH;

unsigned long pattern[40]; //to store the binary pattern

int i;

void irHandler(void){
// external interrupt service routine

  timeL = ICR1L;  // read time since last reset
  timeH = ICR1H;
  pattern[count]= (timeH << 8 ) | timeL;
  //pattern[count] = millis();   //another attemp, I don't which is more clever
  somethingHappend = 1;

void printLong(unsigned long n)
// that is just the new printInteger function copied from the arduino 0004 svn source
        unsigned long base = 10;
      unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars.
      unsigned long i = 0;

      if (n == 0) {

      while (n > 0) {
            buf[i++] = n % base;
            n /= base;

      for (; i > 0; i--)
            printByte(buf[i - 1] < 10 ?
                  '0' + buf[i - 1] :
                  'A' + buf[i - 1] - 10);

void setup() {
  pinMode(irPin, INPUT);
  pinMode(ledPin, OUTPUT);
  beginSerial(9600);           // connect to the serial port to send values back

  TCNT1H = 0;                                    // reset TCNT1
  TCNT1L = 0;
  TIMSK |= _BV(TICIE1);  //enable external interrupt for Timer1
  timerAttach(TIMER1INPUTCAPTURE_INT, irHandler); //attach service routine

void loop() {

    delay(500);                //make shure we wait till the whole pattern for one button press is passed completley!
    TCNT1H = 0;            // reset TCNT1
    TCNT1L = 0;
    count = 0;
    somethingHappend = 0;

  delay(500);             //wait to not overload the serial connection if nothing happend

  // print the last pattern
  for (i=0; i < 40; i++){
    printString(" ");


note that you can't use PWM/analogWrite() now, because timer1 would then be used for 2 things, what is not possible.
Here is a nice page that shows how to record the IR sensor binary pattern with any soundcard:
I think, one should really look into how the IR Remote protocol is constructed. Any hints?
51  Forum 2005-2010 (read only) / Frequently-Asked Questions / wiki please on: March 15, 2006, 06:04:33 pm
just in case the idea get's lost... (massimo, please only read this if you're feeling bored ;-)
please set up a public wiki were we can document our code snipplets and other things.
What's with the wiki on the berlios project page? crap? maybe enough for a start?
I will definitivley document things I figured out, promised!
But I and shurely man others need a place for that. I dislike the current situation, where people like tom igoe collect code on their page.
Shure, the forum grows and grows with nice information, too. But it's no real alternative for an information collection.
52  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: how/where to connect a light sensor 3 pin on: February 25, 2006, 11:17:15 pm
thanks, massimo.
zterm just isn't that nice and simple

53  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: OOP and howto link against wiring libraries on: November 30, 2005, 02:56:47 pm
Nice! This is the kind of information I wanted to hear. :-)
I hope you keep the OOP/C++ approach of the wiring libs when ported to arduino. Somewhere i saw even the proycorn avr libs in the svn folders, too. Well, that would be really neat, if they become integrated.

Now, if only smartprojects would answer me...
Bye, oli
54  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: OOP and howto link against wiring libraries on: November 29, 2005, 03:27:40 pm
it's in the wiring CVS repostitory:

@david and mellis
for what is the wiring lib folder then?
Does it mean future arduino versions will utilize wiring libs? I don't get it...
And "can now link against wiring libs" just means can be ported, right?

Bye, Oli
55  Forum 2005-2010 (read only) / Frequently-Asked Questions / OOP and howto link against wiring libraries on: November 28, 2005, 10:44:28 pm

i'm currently working out if i better go with wiring/atmega128 + programmer or if arduino/atmega8 is enough. As allways, my budget is limited, so I can't just try both.
I guess that with the plan to support more porcessors  by arduino in the future, an atmega128 will someday be supported.
But there is one issue that keeps me thinking:
What are the plans for using OOP and external librarys with arduino? Would OOP create too much overhead for the atmega8's limited memory?

And in the release notes for arduino 0002 it says "can now link against wiring libraries". How exactly? Can I for example reuse the new library from N.Zambetti for led matrixes that is recently available in the wiring/arduino CVS?

I really love the clean and selfexplaining code style of the wiring examples, e.g. the servo example. Actually, this is the first time that I undertsand why OOP can be a good thing ;-). I will use arduino or wiring for my diploma thesis, for what I want to develope a full blown RFID transmitter library to locate objects equipped with RFID tags (yes, the thesis will be about some interaction design... smiley. So, all in all, for at least one project I would be glad to become a developer (i'm experienced with uC and C programming, but a newbie with AVRs).

Greetings from munich, bavaria
56  Forum 2005-2010 (read only) / Frequently-Asked Questions / Re: arduino emulator on: November 29, 2005, 03:42:47 pm
Well, there is JTAG available on all Atmegas bigger than the Atmega8 on the current Arduino boards. With JTAG you have breakpoints, run control and variable/memory watch. So this is possible, in principal (the Atmega128 on the wiring boards could allready do it)!
But you need a special JTAG programmer, too. And most important, the Arduino and Wiring IDEs lag JTAG support at the moment...

57  Forum 2005-2010 (read only) / Bar Sport / python on a micro! on: February 25, 2006, 11:37:51 pm

well, the project is quite old (last update from 2003) and quite beta or gamma state...
But, imagine writing microcontroller programs in a nice & simple scripting language like python instead of C?
Do I see any geeks with glowing eyes now? smiley-cool
Ok, here you go:
It's called pymite and it needs 15kB of flash and 4 kB of RAM, so it's nothing for current arduino boards.
But an Atmega128, for what it's developed, gives plenty of playground space...

What are the thoughts of arduino developers on using a simpler language than C?

58  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino-ites at Chaos Communication Congress ? on: December 29, 2008, 09:02:23 pm

looks like I read this too late.
At least  I'm now downloading the streamdump of this talk... smiley-wink
Unfortunatelly, I'm leaving in a few hours.
Hint: you could also try to find wesen from
He gave a workshop about arduino based and algorithm created music.
59  Forum 2005-2010 (read only) / Bar Sport / Re: Arduino-ites at Chaos Communication Congress ? on: December 27, 2008, 04:48:21 am

I'm there. Maybe we can meet at the microcontrollerworkshop or in the basement/hackcenter?

60  Forum 2005-2010 (read only) / Bar Sport / Re: Version control for hardware projects? on: September 09, 2007, 03:37:16 pm
None at all.  I use subversion on both my Arduino directory and my eagle directory.  With a large project, or with multiple people, I would likely put one project with both hardware and software branches into one or two repositories, but just maintaining control of the Arduino and eagle directories works for my personal stuff (where I'm mostly concerned with having my various machines at work and at home synced up, less so with the revision history).


could you elaborate on svn with eagle usage?
My guess is, when you do an update, schematics and board layouts will be replaced as a whole, as they are binary files. Wouldn't the files get chopped otherwiese?

Shure there is file splitting e.g. as eagle libs, but as I understand eighthave, there is no way to split up a certain schematic or board layout in hierarchically consistent files. Thus, every sheet in an eagle schematic could represent an own file etc. This would be required for really collaborative work on an open hardware project.

Does anybode know how the internals of the open source schematic & layout projects gEDA/PCB ( would allow file versioning?

Well, BTW, there is now, als mellis annouced on the arduino blog:
They hopefully consider a collaboration feature...
Pages: 1 2 3 [4] 5