Thank you, Hans! I did that now after Roman suggested it. Turning all pullup resistors on by default is not a good idea, anyway. Power consumption could go much higher up than USB could actually provide (no prob here since I'm using external power).
BTW, it would be a good idea to update the pduino help file so others can find that information. Ingo > -----Ursprüngliche Nachricht----- > Von: Hans-Christoph Steiner [mailto:h...@at.or.at] > Gesendet: Donnerstag, 1. Juli 2010 03:37 > An: Ingo Scherzinger > Cc: pd-list@iem.at > Betreff: Re: [PD] problem with arduino digital ins - Pduino-0.5beta8 - solved! > > > You can turn on the pull-up resistors from Pd by setting the pinmode > to INPUT, then sending a [digital pin# 1( message to that pin. > > .hc > > On Jun 30, 2010, at 7:29 AM, Ingo Scherzinger wrote: > > > Problem solved! > > > > I added this line to the firmata 2.1: > > > > digitalWrite(pin, HIGH); // turn on pullup resistors > > > > in this context: > > > > case INPUT: > > pinStatus[pin] = mode; > > pinMode(pin, INPUT); > > -> digitalWrite(pin, HIGH); // turn on pullup resistors > > portStatus[port] = portStatus[port] &~ (1 << (pin - offset)); > > break; > > > > exactly as described on the arduino website. > > > > I think this definitely needs to be included in the standard firmata! > > Hans, don't you think so (since you're taking care of the pduino)? > > > > Cheers > > Ingo > > > > > >> From: "Ingo Scherzinger" <i...@miamiwave.com> > >> Subject: [PD] problem with arduino digital ins - Pduino-0.5beta8 / > >> Firmata 2.1 > >> To: <pd-list@iem.at> > >> Message-ID: <821d925e7c144a22b5e3ee150bae3...@meincomputer> > >> Content-Type: text/plain; charset="us-ascii" > >> > >> Hi, > >> > >> I'm having a problem with the arduino digital ins. > >> According to the arduino website there are pull up resistors inside > >> the > >> ATmega that get activated automatically when the digital ins are > >> turned > > on. > >> This is not the case here with the Pduino-0.5beta8. > >> When I connect ground to the pin it switches to 0 as expected. When I > >> disconnect the wire it starts switching randomly between 0 and 1. > >> If I use > >> an "external" pullup resistor everything works as expected again. > >> I just read the help file from the pduino and it states that this > >> is the > >> normal behaviour which shouldn't be the case with the internal pullup > >> resistors activated. > >> What's the problem with these internal pullup resistor not getting > >> turned > >> on? > >> Is there a command I can (or have to) send to the arduino? > >> > >> I've tested this with a diecimila and duemilanove and Ubuntu 10.4 and > >> Windows XP. > >> Maybe there is a problem with Pduino or Firmata 2.1? > >> > >> Any ideas appreciated! > >> Cheers, Ingo > > > > > > > > _______________________________________________ > > Pd-list@iem.at mailing list > > UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd- > list > > > > ---------------------------------------------------------------------------- > > Looking at things from a more basic level, you can come up with a more > direct solution... It may sound small in theory, but it in practice, > it can change entire economies. - Amy Smith _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list