Hey all,
I'm using the new Pduino 0.4beta2 and Firmata0.4beta3 with Pd-Extended 0.39 and 0.40 and an Arduino NG (Atmega16 IC) to control 10 separate LEDs via the Digital Write pins 2-12. Each has the possibility to blink at a different speed. What I've discovered is that if I have more than 6 or 7 LEDs blinking at different speeds, there is cross-talk between the channels causing the LEDs to blink at wrong intervals (but not in unison), including the onboard one on the Arduino board on Pin 13 which I'm not even sending messages to!
I don't believe it is an electrical problem, as the wiring is quite simple and I decoupled the outputs to the LEDs after the problem first occurred. In fact, the problem persists even when I remove any and all of my own electronics from the circuit!
The blink interval is something in the area of 200-500 miliseconds, certainly slow enough for the comport. Could it be trouble with some of the objects in the [arduino] abstraction?
Any and all suggestions appreciated, as this project needs to go out the door tomorrow morning! best, Derek
On Wed, Oct 8, 2008 at 9:38 AM, Derek Holzer derek@umatic.nl wrote:
The blink interval is something in the area of 200-500 miliseconds, certainly slow enough for the comport. Could it be trouble with some of the objects in the [arduino] abstraction?
Hi, Derek,
One thought that occurred to me: it takes around 16-20 ms to send a message to the arduino and recieve a message back (which has to do with the FTDI chip). This is a round-trip time--I'm not sure what the delay time is like for data traffic going in one way. Perhaps those delays are adding up, when you've got 10 separate LEDs to control?
Have you considered making a test program on the arduino to blink the LEDs at different rates and see if the problem persists? That would isolate the communications from the actions performed.
Chuck
Any and all suggestions appreciated, as this project needs to go out the door tomorrow morning! best, Derek -- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista ---Oblique Strategy # 95: "Is something missing?"
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Attached is a diagnostic patch which demonstrates the problem. This problem can be demonstrated using only the Arduino board with a single LED (plus current reducing resistor of 1.5K) connected from pin 2 to GND.
At 7 simultaneous [metro]s, the on-board LED at Pin 13 starts to blink, even when it has not been sent any messages. After that, a single LED on Pin 2 will start to blink sporadically, especially with more randomized [metro] intervals. If the [metro] controlling the LED on Pin 2 is switched off, it will continue to blink if other [metro]s are running.
Clearly this is a case of message collisions, even though the [comport] object does not report any TX-OVERRUNS.
I'm not too skilled with writing code for the Arduino, so I have no way of running something standalone right now to see if it can be isolated from the board.
I'd really like to have a solution or workaround to this problem, as it's quite an unexpected bug!!!!
thanks + best! Derek
Charles Henry wrote:
On Wed, Oct 8, 2008 at 9:38 AM, Derek Holzer derek@umatic.nl wrote:
The blink interval is something in the area of 200-500 miliseconds, certainly slow enough for the comport. Could it be trouble with some of the objects in the [arduino] abstraction?
Hi, Derek,
One thought that occurred to me: it takes around 16-20 ms to send a message to the arduino and recieve a message back (which has to do with the FTDI chip). This is a round-trip time--I'm not sure what the delay time is like for data traffic going in one way. Perhaps those delays are adding up, when you've got 10 separate LEDs to control?
Have you considered making a test program on the arduino to blink the LEDs at different rates and see if the problem persists? That would isolate the communications from the actions performed.
Chuck
On Wed, Oct 8, 2008 at 10:59 AM, Derek Holzer derek@umatic.nl wrote:
I'm not too skilled with writing code for the Arduino, so I have no way of running something standalone right now to see if it can be isolated from the board.
I'd really like to have a solution or workaround to this problem, as it's quite an unexpected bug!!!!
I actually think you will want to code the metro on the arduino. Then, pass only messages to the arduino that will tell it how many ms are between blinks. You could also write routines for synchronizing a pair or more of LEDs, triggered my messages.
To code the metros, the arduino has a routine called millis() which returns the time since the arduino started up. So, I can envision a routine that looks a little like this: L1= time in ms between blinks of LED1 ; T1=time until next blink . . . L10= time in ms between blinks of LED10 ; T10=time until next blink
void loop() { now=millis(); if (now >= T1) { blink LED1; T1=T1+L1; } . . . if (now >= T10) { blink LED10; T10=T10+L10; } }
That's just a fuzzy idea of how I think you can code it. There's probably a bit more timing involved on the side of how long you want the LED's to blink, and of course the message passing/parsing it takes to be able to control everything.
Chuck
There were bugs in that version. They have been fixed in the version
of Firmata that is included in Arduino 0012. Burn that version to
your Arduino and use the regular Pduino pd patches. Once I get a
spare moment, I'll update the Pduino .zip on my page.
.hc
On Oct 8, 2008, at 11:59 AM, Derek Holzer wrote:
Attached is a diagnostic patch which demonstrates the problem. This
problem can be demonstrated using only the Arduino board with a
single LED (plus current reducing resistor of 1.5K) connected from
pin 2 to GND.At 7 simultaneous [metro]s, the on-board LED at Pin 13 starts to
blink, even when it has not been sent any messages. After that, a
single LED on Pin 2 will start to blink sporadically, especially
with more randomized [metro] intervals. If the [metro] controlling
the LED on Pin 2 is switched off, it will continue to blink if
other [metro]s are running.Clearly this is a case of message collisions, even though the
[comport] object does not report any TX-OVERRUNS.I'm not too skilled with writing code for the Arduino, so I have no
way of running something standalone right now to see if it can be
isolated from the board.I'd really like to have a solution or workaround to this problem,
as it's quite an unexpected bug!!!!thanks + best! Derek
Charles Henry wrote:
On Wed, Oct 8, 2008 at 9:38 AM, Derek Holzer derek@umatic.nl wrote:
The blink interval is something in the area of 200-500 miliseconds, certainly slow enough for the comport. Could it be trouble with
some of the objects in the [arduino] abstraction?Hi, Derek, One thought that occurred to me: it takes around 16-20 ms to send a message to the arduino and recieve a message back (which has to do with the FTDI chip). This is a round-trip time--I'm not sure what
the delay time is like for data traffic going in one way. Perhaps those delays are adding up, when you've got 10 separate LEDs to control? Have you considered making a test program on the arduino to blink the LEDs at different rates and see if the problem persists? That would isolate the communications from the actions performed. Chuck-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/ macumbista ---Oblique Strategy # 70: "Feedback recordings into an acoustic situation" #N canvas 0 22 1000 776 10; #X obj 152 528 tgl 20 0 empty empty all 1 12 0 11 -261682 -1 -1 1 1 ; #X obj 374 641 send $0-arduino; #X obj 631 617 send $0-arduino-out; #X obj 631 573 receive $0-arduino; #X obj 94 637 send $0-arduino; #X obj 401 508 tgl 15 0 empty empty 2 3 -6 1 12 -260818 -1 -1 1 1; #X obj 418 508 tgl 15 0 empty empty 3 3 -6 1 12 -260818 -1 -1 1 1; #X obj 435 508 tgl 15 0 empty empty 4 3 -6 1 12 -260818 -1 -1 1 1; #X obj 452 508 tgl 15 0 empty empty 5 3 -6 1 12 -260818 -1 -1 1 1; #X obj 469 508 tgl 15 0 empty empty 6 3 -6 1 12 -260818 -1 -1 1 1; #X obj 486 508 tgl 15 0 empty empty 7 3 -6 1 12 -260818 -1 -1 1 1; #X obj 503 508 tgl 15 0 empty empty 8 3 -6 1 12 -260818 -1 -1 1 1; #X obj 520 508 tgl 15 0 empty empty 9 3 -6 1 12 -260818 -1 -1 1 1; #X obj 537 508 tgl 15 0 empty empty 10 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 554 508 tgl 15 0 empty empty 11 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 571 508 tgl 15 0 empty empty 12 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 589 508 tgl 15 0 empty empty 13 0 -6 1 12 -260818 -1 -1 1 1 ; #X msg 367 549 pinMode 2 1; #N canvas 163 104 696 323 send-to-arduino------------------- 0; #X obj 49 24 inlet; #X obj 89 24 inlet; #X obj 128 24 inlet; #X obj 168 24 inlet; #X obj 208 24 inlet; #X obj 248 24 inlet; #X obj 287 24 inlet; #X obj 327 24 inlet; #X obj 368 23 inlet; #X obj 408 23 inlet; #X obj 447 23 inlet; #X obj 487 23 inlet; #X obj 527 23 inlet; #X msg 49 66 pinMode 0 $1; #X msg 89 88 pinMode 1 $1; #X msg 128 110 pinMode 2 $1; #X msg 168 130 pinMode 3 $1; #X msg 208 62 pinMode 4 $1; #X msg 248 84 pinMode 5 $1; #X msg 287 106 pinMode 6 $1; #X msg 327 126 pinMode 7 $1; #X msg 368 58 pinMode 8 $1; #X msg 408 80 pinMode 9 $1; #X msg 447 102 pinMode 10 $1; #X msg 487 122 pinMode 11 $1; #X msg 527 50 pinMode 12 $1; #X obj 566 23 inlet; #X msg 566 70 pinMode 13 $1; #X obj 305 282 outlet; #X obj 305 243 trigger bang anything; #X obj 305 196 list prepend set; #X obj 305 220 list trim; #X connect 0 0 13 0; #X connect 1 0 14 0; #X connect 2 0 15 0; #X connect 3 0 16 0; #X connect 4 0 17 0; #X connect 5 0 18 0; #X connect 6 0 19 0; #X connect 7 0 20 0; #X connect 8 0 21 0; #X connect 9 0 22 0; #X connect 10 0 23 0; #X connect 11 0 24 0; #X connect 12 0 25 0; #X connect 13 0 30 0; #X connect 14 0 30 0; #X connect 15 0 30 0; #X connect 16 0 30 0; #X connect 17 0 30 0; #X connect 18 0 30 0; #X connect 19 0 30 0; #X connect 20 0 30 0; #X connect 21 0 30 0; #X connect 22 0 30 0; #X connect 23 0 30 0; #X connect 24 0 30 0; #X connect 25 0 30 0; #X connect 26 0 27 0; #X connect 27 0 30 0; #X connect 29 0 28 0; #X connect 29 1 28 0; #X connect 30 0 31 0; #X connect 31 0 29 0; #X restore 367 527 pd send-to-arduino-------------------; #X text 446 597 here is our Arduino object -->; #X msg 94 466 open 3; #X obj 567 287 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 38 478 close; #X msg 97 311 digital 2 $1; #X msg 187 311 digital 3 $1; #X msg 277 311 digital 4 $1; #X msg 367 311 digital 5 $1; #X msg 457 311 digital 6 $1; #X msg 97 361 digital 7 $1; #X msg 187 361 digital 8 $1; #X msg 277 361 digital 9 $1; #X msg 367 361 digital 10 $1; #X msg 457 361 digital 11 $1; #X msg 567 305 digital 13 $1; #X text 665 306 test with built in LED; #X obj 117 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 144 265 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 192 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 232 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 282 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 631 596 arduino 1; #X obj 575 337 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 575 355 digital 12 $1; #X obj 332 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 359 256 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 407 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 447 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 497 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 34 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1 ; #X obj 85 35 random 200; #X obj 85 62 + 200; #X floatatom 104 92 5 0 0 0 - - -; #X obj 85 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 225 35 random 200; #X obj 225 62 + 200; #X floatatom 244 92 5 0 0 0 - - -; #X obj 225 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 91 metro 200; #X obj 314 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 365 35 random 200; #X obj 365 62 + 200; #X floatatom 384 92 5 0 0 0 - - -; #X obj 365 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 314 91 metro 200; #X obj 454 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 505 35 random 200; #X obj 505 62 + 200; #X floatatom 524 92 5 0 0 0 - - -; #X obj 505 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 454 91 metro 200; #X obj 594 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 645 35 random 200; #X obj 645 62 + 200; #X floatatom 664 92 5 0 0 0 - - -; #X obj 645 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 594 91 metro 200; #X obj 124 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 175 145 random 200; #X obj 175 172 + 200; #X floatatom 194 202 5 0 0 0 - - -; #X obj 175 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 124 201 metro 200; #X obj 264 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 315 145 random 200; #X obj 315 172 + 200; #X floatatom 334 202 5 0 0 0 - - -; #X obj 315 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 264 201 metro 200; #X obj 404 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 455 145 random 200; #X obj 455 172 + 200; #X floatatom 474 202 5 0 0 0 - - -; #X obj 455 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 404 201 metro 200; #X obj 544 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 595 145 random 200; #X obj 595 172 + 200; #X floatatom 614 202 5 0 0 0 - - -; #X obj 595 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 544 201 metro 200; #X obj 684 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 735 145 random 200; #X obj 735 172 + 200; #X floatatom 754 202 5 0 0 0 - - -; #X obj 735 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 34 91 metro 200; #X obj 684 201 metro 200; #X text 621 407 At 7 metros , on-board LED at Pin 13 will light even when no message is sent. More metros will cause single LED to blink sporadically. If LED is connected to first channel , and that metro is switched off , it will still blink when other metros run.; #X connect 0 0 16 0; #X connect 0 0 15 0; #X connect 0 0 14 0; #X connect 0 0 13 0; #X connect 0 0 12 0; #X connect 0 0 11 0; #X connect 0 0 10 0; #X connect 0 0 9 0; #X connect 0 0 8 0; #X connect 0 0 7 0; #X connect 0 0 6 0; #X connect 0 0 5 0; #X connect 3 0 40 0; #X connect 5 0 18 2; #X connect 6 0 18 3; #X connect 7 0 18 4; #X connect 8 0 18 5; #X connect 9 0 18 6; #X connect 10 0 18 7; #X connect 11 0 18 8; #X connect 12 0 18 9; #X connect 13 0 18 10; #X connect 14 0 18 11; #X connect 15 0 18 12; #X connect 16 0 18 13; #X connect 17 0 1 0; #X connect 18 0 17 0; #X connect 20 0 4 0; #X connect 21 0 33 0; #X connect 22 0 4 0; #X connect 23 0 1 0; #X connect 24 0 1 0; #X connect 25 0 1 0; #X connect 26 0 1 0; #X connect 27 0 1 0; #X connect 28 0 1 0; #X connect 29 0 1 0; #X connect 30 0 1 0; #X connect 31 0 1 0; #X connect 32 0 1 0; #X connect 33 0 1 0; #X connect 35 0 23 0; #X connect 36 0 24 0; #X connect 37 0 25 0; #X connect 38 0 26 0; #X connect 39 0 27 0; #X connect 40 0 2 0; #X connect 41 0 42 0; #X connect 42 0 1 0; #X connect 43 0 28 0; #X connect 44 0 29 0; #X connect 45 0 30 0; #X connect 46 0 31 0; #X connect 47 0 32 0; #X connect 48 0 106 0; #X connect 49 0 50 0; #X connect 50 0 51 0; #X connect 50 0 106 1; #X connect 52 0 49 0; #X connect 53 0 58 0; #X connect 54 0 55 0; #X connect 55 0 56 0; #X connect 55 0 58 1; #X connect 57 0 54 0; #X connect 58 0 36 0; #X connect 59 0 64 0; #X connect 60 0 61 0; #X connect 61 0 62 0; #X connect 61 0 64 1; #X connect 63 0 60 0; #X connect 64 0 37 0; #X connect 65 0 70 0; #X connect 66 0 67 0; #X connect 67 0 68 0; #X connect 67 0 70 1; #X connect 69 0 66 0; #X connect 70 0 38 0; #X connect 71 0 76 0; #X connect 72 0 73 0; #X connect 73 0 74 0; #X connect 73 0 76 1; #X connect 75 0 72 0; #X connect 76 0 39 0; #X connect 77 0 82 0; #X connect 78 0 79 0; #X connect 79 0 80 0; #X connect 79 0 82 1; #X connect 81 0 78 0; #X connect 82 0 43 0; #X connect 83 0 88 0; #X connect 84 0 85 0; #X connect 85 0 86 0; #X connect 85 0 88 1; #X connect 87 0 84 0; #X connect 88 0 44 0; #X connect 89 0 94 0; #X connect 90 0 91 0; #X connect 91 0 92 0; #X connect 91 0 94 1; #X connect 93 0 90 0; #X connect 94 0 45 0; #X connect 95 0 100 0; #X connect 96 0 97 0; #X connect 97 0 98 0; #X connect 97 0 100 1; #X connect 99 0 96 0; #X connect 100 0 46 0; #X connect 101 0 107 0; #X connect 102 0 103 0; #X connect 103 0 104 0; #X connect 103 0 107 1; #X connect 105 0 102 0; #X connect 106 0 35 0; #X connect 107 0 47 0; _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
There is no way to peace, peace is the way. -A.J. Muste
Problem remains the same after upgrade. Looks like I or probably a friend have to write some custom firmware for this project before tomorrow.
D.
Hans-Christoph Steiner wrote:
There were bugs in that version. They have been fixed in the version of Firmata that is included in Arduino 0012. Burn that version to your Arduino and use the regular Pduino pd patches. Once I get a spare moment, I'll update the Pduino .zip on my page.
.hc
On Oct 8, 2008, at 11:59 AM, Derek Holzer wrote:
Attached is a diagnostic patch which demonstrates the problem. This problem can be demonstrated using only the Arduino board with a single LED (plus current reducing resistor of 1.5K) connected from pin 2 to GND.
At 7 simultaneous [metro]s, the on-board LED at Pin 13 starts to blink, even when it has not been sent any messages. After that, a single LED on Pin 2 will start to blink sporadically, especially with more randomized [metro] intervals. If the [metro] controlling the LED on Pin 2 is switched off, it will continue to blink if other [metro]s are running.
Clearly this is a case of message collisions, even though the [comport] object does not report any TX-OVERRUNS.
I'm not too skilled with writing code for the Arduino, so I have no way of running something standalone right now to see if it can be isolated from the board.
I'd really like to have a solution or workaround to this problem, as it's quite an unexpected bug!!!!
thanks + best! Derek
Charles Henry wrote:
On Wed, Oct 8, 2008 at 9:38 AM, Derek Holzer derek@umatic.nl wrote:
The blink interval is something in the area of 200-500 miliseconds, certainly slow enough for the comport. Could it be trouble with some of the objects in the [arduino] abstraction?
Hi, Derek, One thought that occurred to me: it takes around 16-20 ms to send a message to the arduino and recieve a message back (which has to do with the FTDI chip). This is a round-trip time--I'm not sure what the delay time is like for data traffic going in one way. Perhaps those delays are adding up, when you've got 10 separate LEDs to control? Have you considered making a test program on the arduino to blink the LEDs at different rates and see if the problem persists? That would isolate the communications from the actions performed. Chuck
-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista ---Oblique Strategy # 70: "Feedback recordings into an acoustic situation" #N canvas 0 22 1000 776 10; #X obj 152 528 tgl 20 0 empty empty all 1 12 0 11 -261682 -1 -1 1 1 ; #X obj 374 641 send $0-arduino; #X obj 631 617 send $0-arduino-out; #X obj 631 573 receive $0-arduino; #X obj 94 637 send $0-arduino; #X obj 401 508 tgl 15 0 empty empty 2 3 -6 1 12 -260818 -1 -1 1 1; #X obj 418 508 tgl 15 0 empty empty 3 3 -6 1 12 -260818 -1 -1 1 1; #X obj 435 508 tgl 15 0 empty empty 4 3 -6 1 12 -260818 -1 -1 1 1; #X obj 452 508 tgl 15 0 empty empty 5 3 -6 1 12 -260818 -1 -1 1 1; #X obj 469 508 tgl 15 0 empty empty 6 3 -6 1 12 -260818 -1 -1 1 1; #X obj 486 508 tgl 15 0 empty empty 7 3 -6 1 12 -260818 -1 -1 1 1; #X obj 503 508 tgl 15 0 empty empty 8 3 -6 1 12 -260818 -1 -1 1 1; #X obj 520 508 tgl 15 0 empty empty 9 3 -6 1 12 -260818 -1 -1 1 1; #X obj 537 508 tgl 15 0 empty empty 10 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 554 508 tgl 15 0 empty empty 11 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 571 508 tgl 15 0 empty empty 12 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 589 508 tgl 15 0 empty empty 13 0 -6 1 12 -260818 -1 -1 1 1 ; #X msg 367 549 pinMode 2 1; #N canvas 163 104 696 323 send-to-arduino------------------- 0; #X obj 49 24 inlet; #X obj 89 24 inlet; #X obj 128 24 inlet; #X obj 168 24 inlet; #X obj 208 24 inlet; #X obj 248 24 inlet; #X obj 287 24 inlet; #X obj 327 24 inlet; #X obj 368 23 inlet; #X obj 408 23 inlet; #X obj 447 23 inlet; #X obj 487 23 inlet; #X obj 527 23 inlet; #X msg 49 66 pinMode 0 $1; #X msg 89 88 pinMode 1 $1; #X msg 128 110 pinMode 2 $1; #X msg 168 130 pinMode 3 $1; #X msg 208 62 pinMode 4 $1; #X msg 248 84 pinMode 5 $1; #X msg 287 106 pinMode 6 $1; #X msg 327 126 pinMode 7 $1; #X msg 368 58 pinMode 8 $1; #X msg 408 80 pinMode 9 $1; #X msg 447 102 pinMode 10 $1; #X msg 487 122 pinMode 11 $1; #X msg 527 50 pinMode 12 $1; #X obj 566 23 inlet; #X msg 566 70 pinMode 13 $1; #X obj 305 282 outlet; #X obj 305 243 trigger bang anything; #X obj 305 196 list prepend set; #X obj 305 220 list trim; #X connect 0 0 13 0; #X connect 1 0 14 0; #X connect 2 0 15 0; #X connect 3 0 16 0; #X connect 4 0 17 0; #X connect 5 0 18 0; #X connect 6 0 19 0; #X connect 7 0 20 0; #X connect 8 0 21 0; #X connect 9 0 22 0; #X connect 10 0 23 0; #X connect 11 0 24 0; #X connect 12 0 25 0; #X connect 13 0 30 0; #X connect 14 0 30 0; #X connect 15 0 30 0; #X connect 16 0 30 0; #X connect 17 0 30 0; #X connect 18 0 30 0; #X connect 19 0 30 0; #X connect 20 0 30 0; #X connect 21 0 30 0; #X connect 22 0 30 0; #X connect 23 0 30 0; #X connect 24 0 30 0; #X connect 25 0 30 0; #X connect 26 0 27 0; #X connect 27 0 30 0; #X connect 29 0 28 0; #X connect 29 1 28 0; #X connect 30 0 31 0; #X connect 31 0 29 0; #X restore 367 527 pd send-to-arduino-------------------; #X text 446 597 here is our Arduino object -->; #X msg 94 466 open 3; #X obj 567 287 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 38 478 close; #X msg 97 311 digital 2 $1; #X msg 187 311 digital 3 $1; #X msg 277 311 digital 4 $1; #X msg 367 311 digital 5 $1; #X msg 457 311 digital 6 $1; #X msg 97 361 digital 7 $1; #X msg 187 361 digital 8 $1; #X msg 277 361 digital 9 $1; #X msg 367 361 digital 10 $1; #X msg 457 361 digital 11 $1; #X msg 567 305 digital 13 $1; #X text 665 306 test with built in LED; #X obj 117 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 144 265 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 192 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 232 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 282 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 631 596 arduino 1; #X obj 575 337 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 575 355 digital 12 $1; #X obj 332 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 359 256 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 407 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 447 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 497 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 34 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1 ; #X obj 85 35 random 200; #X obj 85 62 + 200; #X floatatom 104 92 5 0 0 0 - - -; #X obj 85 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 225 35 random 200; #X obj 225 62 + 200; #X floatatom 244 92 5 0 0 0 - - -; #X obj 225 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 91 metro 200; #X obj 314 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 365 35 random 200; #X obj 365 62 + 200; #X floatatom 384 92 5 0 0 0 - - -; #X obj 365 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 314 91 metro 200; #X obj 454 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 505 35 random 200; #X obj 505 62 + 200; #X floatatom 524 92 5 0 0 0 - - -; #X obj 505 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 454 91 metro 200; #X obj 594 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 645 35 random 200; #X obj 645 62 + 200; #X floatatom 664 92 5 0 0 0 - - -; #X obj 645 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 594 91 metro 200; #X obj 124 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 175 145 random 200; #X obj 175 172 + 200; #X floatatom 194 202 5 0 0 0 - - -; #X obj 175 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 124 201 metro 200; #X obj 264 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 315 145 random 200; #X obj 315 172 + 200; #X floatatom 334 202 5 0 0 0 - - -; #X obj 315 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 264 201 metro 200; #X obj 404 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 455 145 random 200; #X obj 455 172 + 200; #X floatatom 474 202 5 0 0 0 - - -; #X obj 455 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 404 201 metro 200; #X obj 544 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 595 145 random 200; #X obj 595 172 + 200; #X floatatom 614 202 5 0 0 0 - - -; #X obj 595 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 544 201 metro 200; #X obj 684 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 735 145 random 200; #X obj 735 172 + 200; #X floatatom 754 202 5 0 0 0 - - -; #X obj 735 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 34 91 metro 200; #X obj 684 201 metro 200; #X text 621 407 At 7 metros , on-board LED at Pin 13 will light even when no message is sent. More metros will cause single LED to blink sporadically. If LED is connected to first channel , and that metro is switched off , it will still blink when other metros run.; #X connect 0 0 16 0; #X connect 0 0 15 0; #X connect 0 0 14 0; #X connect 0 0 13 0; #X connect 0 0 12 0; #X connect 0 0 11 0; #X connect 0 0 10 0; #X connect 0 0 9 0; #X connect 0 0 8 0; #X connect 0 0 7 0; #X connect 0 0 6 0; #X connect 0 0 5 0; #X connect 3 0 40 0; #X connect 5 0 18 2; #X connect 6 0 18 3; #X connect 7 0 18 4; #X connect 8 0 18 5; #X connect 9 0 18 6; #X connect 10 0 18 7; #X connect 11 0 18 8; #X connect 12 0 18 9; #X connect 13 0 18 10; #X connect 14 0 18 11; #X connect 15 0 18 12; #X connect 16 0 18 13; #X connect 17 0 1 0; #X connect 18 0 17 0; #X connect 20 0 4 0; #X connect 21 0 33 0; #X connect 22 0 4 0; #X connect 23 0 1 0; #X connect 24 0 1 0; #X connect 25 0 1 0; #X connect 26 0 1 0; #X connect 27 0 1 0; #X connect 28 0 1 0; #X connect 29 0 1 0; #X connect 30 0 1 0; #X connect 31 0 1 0; #X connect 32 0 1 0; #X connect 33 0 1 0; #X connect 35 0 23 0; #X connect 36 0 24 0; #X connect 37 0 25 0; #X connect 38 0 26 0; #X connect 39 0 27 0; #X connect 40 0 2 0; #X connect 41 0 42 0; #X connect 42 0 1 0; #X connect 43 0 28 0; #X connect 44 0 29 0; #X connect 45 0 30 0; #X connect 46 0 31 0; #X connect 47 0 32 0; #X connect 48 0 106 0; #X connect 49 0 50 0; #X connect 50 0 51 0; #X connect 50 0 106 1; #X connect 52 0 49 0; #X connect 53 0 58 0; #X connect 54 0 55 0; #X connect 55 0 56 0; #X connect 55 0 58 1; #X connect 57 0 54 0; #X connect 58 0 36 0; #X connect 59 0 64 0; #X connect 60 0 61 0; #X connect 61 0 62 0; #X connect 61 0 64 1; #X connect 63 0 60 0; #X connect 64 0 37 0; #X connect 65 0 70 0; #X connect 66 0 67 0; #X connect 67 0 68 0; #X connect 67 0 70 1; #X connect 69 0 66 0; #X connect 70 0 38 0; #X connect 71 0 76 0; #X connect 72 0 73 0; #X connect 73 0 74 0; #X connect 73 0 76 1; #X connect 75 0 72 0; #X connect 76 0 39 0; #X connect 77 0 82 0; #X connect 78 0 79 0; #X connect 79 0 80 0; #X connect 79 0 82 1; #X connect 81 0 78 0; #X connect 82 0 43 0; #X connect 83 0 88 0; #X connect 84 0 85 0; #X connect 85 0 86 0; #X connect 85 0 88 1; #X connect 87 0 84 0; #X connect 88 0 44 0; #X connect 89 0 94 0; #X connect 90 0 91 0; #X connect 91 0 92 0; #X connect 91 0 94 1; #X connect 93 0 90 0; #X connect 94 0 45 0; #X connect 95 0 100 0; #X connect 96 0 97 0; #X connect 97 0 98 0; #X connect 97 0 100 1; #X connect 99 0 96 0; #X connect 100 0 46 0; #X connect 101 0 107 0; #X connect 102 0 103 0; #X connect 103 0 104 0; #X connect 103 0 107 1; #X connect 105 0 102 0; #X connect 106 0 35 0; #X connect 107 0 47 0; _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
There is no way to peace, peace is the way. -A.J. Muste
I'll take a look and see what I can find. You could also write an
Arduino firmware using Firmata as a library, then just support the
things you need to have working. Perhaps the timing of the analogIns
or something like that are interfering.
Look at the examples in Arduino, like SimpleDigitalFirmata. They are
in File -> Sketchbook -> examples -> Library-Firmata
.hc
On Oct 8, 2008, at 2:07 PM, Derek Holzer wrote:
Problem remains the same after upgrade. Looks like I or probably a
friend have to write some custom firmware for this project before
tomorrow.D.
Hans-Christoph Steiner wrote:
There were bugs in that version. They have been fixed in the
version of Firmata that is included in Arduino 0012. Burn that
version to your Arduino and use the regular Pduino pd patches.
Once I get a spare moment, I'll update the Pduino .zip on my page. .hc On Oct 8, 2008, at 11:59 AM, Derek Holzer wrote:Attached is a diagnostic patch which demonstrates the problem.
This problem can be demonstrated using only the Arduino board
with a single LED (plus current reducing resistor of 1.5K)
connected from pin 2 to GND.At 7 simultaneous [metro]s, the on-board LED at Pin 13 starts to
blink, even when it has not been sent any messages. After that, a
single LED on Pin 2 will start to blink sporadically, especially
with more randomized [metro] intervals. If the [metro]
controlling the LED on Pin 2 is switched off, it will continue to
blink if other [metro]s are running.Clearly this is a case of message collisions, even though the
[comport] object does not report any TX-OVERRUNS.I'm not too skilled with writing code for the Arduino, so I have
no way of running something standalone right now to see if it can
be isolated from the board.I'd really like to have a solution or workaround to this problem,
as it's quite an unexpected bug!!!!thanks + best! Derek
Charles Henry wrote:
On Wed, Oct 8, 2008 at 9:38 AM, Derek Holzer derek@umatic.nl
wrote:The blink interval is something in the area of 200-500
miliseconds, certainly slow enough for the comport. Could it be trouble with
some of the objects in the [arduino] abstraction?Hi, Derek, One thought that occurred to me: it takes around 16-20 ms to send a message to the arduino and recieve a message back (which has to do with the FTDI chip). This is a round-trip time--I'm not sure
what the delay time is like for data traffic going in one way. Perhaps
those delays are adding up, when you've got 10 separate LEDs to control? Have you considered making a test program on the arduino to
blink the LEDs at different rates and see if the problem persists? That
would isolate the communications from the actions performed. Chuck-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/ macumbista ---Oblique Strategy # 70: "Feedback recordings into an acoustic situation" #N canvas 0 22 1000 776 10; #X obj 152 528 tgl 20 0 empty empty all 1 12 0 11 -261682 -1 -1 1 1 ; #X obj 374 641 send $0-arduino; #X obj 631 617 send $0-arduino-out; #X obj 631 573 receive $0-arduino; #X obj 94 637 send $0-arduino; #X obj 401 508 tgl 15 0 empty empty 2 3 -6 1 12 -260818 -1 -1 1 1; #X obj 418 508 tgl 15 0 empty empty 3 3 -6 1 12 -260818 -1 -1 1 1; #X obj 435 508 tgl 15 0 empty empty 4 3 -6 1 12 -260818 -1 -1 1 1; #X obj 452 508 tgl 15 0 empty empty 5 3 -6 1 12 -260818 -1 -1 1 1; #X obj 469 508 tgl 15 0 empty empty 6 3 -6 1 12 -260818 -1 -1 1 1; #X obj 486 508 tgl 15 0 empty empty 7 3 -6 1 12 -260818 -1 -1 1 1; #X obj 503 508 tgl 15 0 empty empty 8 3 -6 1 12 -260818 -1 -1 1 1; #X obj 520 508 tgl 15 0 empty empty 9 3 -6 1 12 -260818 -1 -1 1 1; #X obj 537 508 tgl 15 0 empty empty 10 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 554 508 tgl 15 0 empty empty 11 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 571 508 tgl 15 0 empty empty 12 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 589 508 tgl 15 0 empty empty 13 0 -6 1 12 -260818 -1 -1 1 1 ; #X msg 367 549 pinMode 2 1; #N canvas 163 104 696 323 send-to-arduino------------------- 0; #X obj 49 24 inlet; #X obj 89 24 inlet; #X obj 128 24 inlet; #X obj 168 24 inlet; #X obj 208 24 inlet; #X obj 248 24 inlet; #X obj 287 24 inlet; #X obj 327 24 inlet; #X obj 368 23 inlet; #X obj 408 23 inlet; #X obj 447 23 inlet; #X obj 487 23 inlet; #X obj 527 23 inlet; #X msg 49 66 pinMode 0 $1; #X msg 89 88 pinMode 1 $1; #X msg 128 110 pinMode 2 $1; #X msg 168 130 pinMode 3 $1; #X msg 208 62 pinMode 4 $1; #X msg 248 84 pinMode 5 $1; #X msg 287 106 pinMode 6 $1; #X msg 327 126 pinMode 7 $1; #X msg 368 58 pinMode 8 $1; #X msg 408 80 pinMode 9 $1; #X msg 447 102 pinMode 10 $1; #X msg 487 122 pinMode 11 $1; #X msg 527 50 pinMode 12 $1; #X obj 566 23 inlet; #X msg 566 70 pinMode 13 $1; #X obj 305 282 outlet; #X obj 305 243 trigger bang anything; #X obj 305 196 list prepend set; #X obj 305 220 list trim; #X connect 0 0 13 0; #X connect 1 0 14 0; #X connect 2 0 15 0; #X connect 3 0 16 0; #X connect 4 0 17 0; #X connect 5 0 18 0; #X connect 6 0 19 0; #X connect 7 0 20 0; #X connect 8 0 21 0; #X connect 9 0 22 0; #X connect 10 0 23 0; #X connect 11 0 24 0; #X connect 12 0 25 0; #X connect 13 0 30 0; #X connect 14 0 30 0; #X connect 15 0 30 0; #X connect 16 0 30 0; #X connect 17 0 30 0; #X connect 18 0 30 0; #X connect 19 0 30 0; #X connect 20 0 30 0; #X connect 21 0 30 0; #X connect 22 0 30 0; #X connect 23 0 30 0; #X connect 24 0 30 0; #X connect 25 0 30 0; #X connect 26 0 27 0; #X connect 27 0 30 0; #X connect 29 0 28 0; #X connect 29 1 28 0; #X connect 30 0 31 0; #X connect 31 0 29 0; #X restore 367 527 pd send-to-arduino-------------------; #X text 446 597 here is our Arduino object -->; #X msg 94 466 open 3; #X obj 567 287 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 38 478 close; #X msg 97 311 digital 2 $1; #X msg 187 311 digital 3 $1; #X msg 277 311 digital 4 $1; #X msg 367 311 digital 5 $1; #X msg 457 311 digital 6 $1; #X msg 97 361 digital 7 $1; #X msg 187 361 digital 8 $1; #X msg 277 361 digital 9 $1; #X msg 367 361 digital 10 $1; #X msg 457 361 digital 11 $1; #X msg 567 305 digital 13 $1; #X text 665 306 test with built in LED; #X obj 117 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 144 265 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 192 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 232 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 282 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 631 596 arduino 1; #X obj 575 337 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 575 355 digital 12 $1; #X obj 332 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 359 256 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 407 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 447 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 497 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 34 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1 ; #X obj 85 35 random 200; #X obj 85 62 + 200; #X floatatom 104 92 5 0 0 0 - - -; #X obj 85 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 225 35 random 200; #X obj 225 62 + 200; #X floatatom 244 92 5 0 0 0 - - -; #X obj 225 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 91 metro 200; #X obj 314 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 365 35 random 200; #X obj 365 62 + 200; #X floatatom 384 92 5 0 0 0 - - -; #X obj 365 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 314 91 metro 200; #X obj 454 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 505 35 random 200; #X obj 505 62 + 200; #X floatatom 524 92 5 0 0 0 - - -; #X obj 505 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 454 91 metro 200; #X obj 594 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 645 35 random 200; #X obj 645 62 + 200; #X floatatom 664 92 5 0 0 0 - - -; #X obj 645 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 594 91 metro 200; #X obj 124 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 175 145 random 200; #X obj 175 172 + 200; #X floatatom 194 202 5 0 0 0 - - -; #X obj 175 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 124 201 metro 200; #X obj 264 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 315 145 random 200; #X obj 315 172 + 200; #X floatatom 334 202 5 0 0 0 - - -; #X obj 315 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 264 201 metro 200; #X obj 404 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 455 145 random 200; #X obj 455 172 + 200; #X floatatom 474 202 5 0 0 0 - - -; #X obj 455 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 404 201 metro 200; #X obj 544 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 595 145 random 200; #X obj 595 172 + 200; #X floatatom 614 202 5 0 0 0 - - -; #X obj 595 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 544 201 metro 200; #X obj 684 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 735 145 random 200; #X obj 735 172 + 200; #X floatatom 754 202 5 0 0 0 - - -; #X obj 735 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 34 91 metro 200; #X obj 684 201 metro 200; #X text 621 407 At 7 metros , on-board LED at Pin 13 will light
even when no message is sent. More metros will cause single LED to blink sporadically. If LED is connected to first channel , and that metro is switched off , it will still blink when other metros run.; #X connect 0 0 16 0; #X connect 0 0 15 0; #X connect 0 0 14 0; #X connect 0 0 13 0; #X connect 0 0 12 0; #X connect 0 0 11 0; #X connect 0 0 10 0; #X connect 0 0 9 0; #X connect 0 0 8 0; #X connect 0 0 7 0; #X connect 0 0 6 0; #X connect 0 0 5 0; #X connect 3 0 40 0; #X connect 5 0 18 2; #X connect 6 0 18 3; #X connect 7 0 18 4; #X connect 8 0 18 5; #X connect 9 0 18 6; #X connect 10 0 18 7; #X connect 11 0 18 8; #X connect 12 0 18 9; #X connect 13 0 18 10; #X connect 14 0 18 11; #X connect 15 0 18 12; #X connect 16 0 18 13; #X connect 17 0 1 0; #X connect 18 0 17 0; #X connect 20 0 4 0; #X connect 21 0 33 0; #X connect 22 0 4 0; #X connect 23 0 1 0; #X connect 24 0 1 0; #X connect 25 0 1 0; #X connect 26 0 1 0; #X connect 27 0 1 0; #X connect 28 0 1 0; #X connect 29 0 1 0; #X connect 30 0 1 0; #X connect 31 0 1 0; #X connect 32 0 1 0; #X connect 33 0 1 0; #X connect 35 0 23 0; #X connect 36 0 24 0; #X connect 37 0 25 0; #X connect 38 0 26 0; #X connect 39 0 27 0; #X connect 40 0 2 0; #X connect 41 0 42 0; #X connect 42 0 1 0; #X connect 43 0 28 0; #X connect 44 0 29 0; #X connect 45 0 30 0; #X connect 46 0 31 0; #X connect 47 0 32 0; #X connect 48 0 106 0; #X connect 49 0 50 0; #X connect 50 0 51 0; #X connect 50 0 106 1; #X connect 52 0 49 0; #X connect 53 0 58 0; #X connect 54 0 55 0; #X connect 55 0 56 0; #X connect 55 0 58 1; #X connect 57 0 54 0; #X connect 58 0 36 0; #X connect 59 0 64 0; #X connect 60 0 61 0; #X connect 61 0 62 0; #X connect 61 0 64 1; #X connect 63 0 60 0; #X connect 64 0 37 0; #X connect 65 0 70 0; #X connect 66 0 67 0; #X connect 67 0 68 0; #X connect 67 0 70 1; #X connect 69 0 66 0; #X connect 70 0 38 0; #X connect 71 0 76 0; #X connect 72 0 73 0; #X connect 73 0 74 0; #X connect 73 0 76 1; #X connect 75 0 72 0; #X connect 76 0 39 0; #X connect 77 0 82 0; #X connect 78 0 79 0; #X connect 79 0 80 0; #X connect 79 0 82 1; #X connect 81 0 78 0; #X connect 82 0 43 0; #X connect 83 0 88 0; #X connect 84 0 85 0; #X connect 85 0 86 0; #X connect 85 0 88 1; #X connect 87 0 84 0; #X connect 88 0 44 0; #X connect 89 0 94 0; #X connect 90 0 91 0; #X connect 91 0 92 0; #X connect 91 0 94 1; #X connect 93 0 90 0; #X connect 94 0 45 0; #X connect 95 0 100 0; #X connect 96 0 97 0; #X connect 97 0 98 0; #X connect 97 0 100 1; #X connect 99 0 96 0; #X connect 100 0 46 0; #X connect 101 0 107 0; #X connect 102 0 103 0; #X connect 103 0 104 0; #X connect 103 0 107 1; #X connect 105 0 102 0; #X connect 106 0 35 0; #X connect 107 0 47 0; _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
------- There is no way to peace, peace is the way. -A.J. Muste
-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/ macumbista ---Oblique Strategy # 113: "Make a blank valuable by putting it in an exquisite frame"
'You people have such restrictive dress for women,’ she said,
hobbling away in three inch heels and panty hose to finish out
another pink-collar temp pool day. - “Hijab Scene #2", by Mohja Kahf
I am currently arduinoless, but once I get home tonight, I'll see if
I can find the root of the problem.
.hc
On Oct 8, 2008, at 2:07 PM, Derek Holzer wrote:
Problem remains the same after upgrade. Looks like I or probably a
friend have to write some custom firmware for this project before
tomorrow.D.
Hans-Christoph Steiner wrote:
There were bugs in that version. They have been fixed in the
version of Firmata that is included in Arduino 0012. Burn that
version to your Arduino and use the regular Pduino pd patches.
Once I get a spare moment, I'll update the Pduino .zip on my page. .hc On Oct 8, 2008, at 11:59 AM, Derek Holzer wrote:Attached is a diagnostic patch which demonstrates the problem.
This problem can be demonstrated using only the Arduino board
with a single LED (plus current reducing resistor of 1.5K)
connected from pin 2 to GND.At 7 simultaneous [metro]s, the on-board LED at Pin 13 starts to
blink, even when it has not been sent any messages. After that, a
single LED on Pin 2 will start to blink sporadically, especially
with more randomized [metro] intervals. If the [metro]
controlling the LED on Pin 2 is switched off, it will continue to
blink if other [metro]s are running.Clearly this is a case of message collisions, even though the
[comport] object does not report any TX-OVERRUNS.I'm not too skilled with writing code for the Arduino, so I have
no way of running something standalone right now to see if it can
be isolated from the board.I'd really like to have a solution or workaround to this problem,
as it's quite an unexpected bug!!!!thanks + best! Derek
Charles Henry wrote:
On Wed, Oct 8, 2008 at 9:38 AM, Derek Holzer derek@umatic.nl
wrote:The blink interval is something in the area of 200-500
miliseconds, certainly slow enough for the comport. Could it be trouble with
some of the objects in the [arduino] abstraction?Hi, Derek, One thought that occurred to me: it takes around 16-20 ms to send a message to the arduino and recieve a message back (which has to do with the FTDI chip). This is a round-trip time--I'm not sure
what the delay time is like for data traffic going in one way. Perhaps
those delays are adding up, when you've got 10 separate LEDs to control? Have you considered making a test program on the arduino to
blink the LEDs at different rates and see if the problem persists? That
would isolate the communications from the actions performed. Chuck-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/ macumbista ---Oblique Strategy # 70: "Feedback recordings into an acoustic situation" #N canvas 0 22 1000 776 10; #X obj 152 528 tgl 20 0 empty empty all 1 12 0 11 -261682 -1 -1 1 1 ; #X obj 374 641 send $0-arduino; #X obj 631 617 send $0-arduino-out; #X obj 631 573 receive $0-arduino; #X obj 94 637 send $0-arduino; #X obj 401 508 tgl 15 0 empty empty 2 3 -6 1 12 -260818 -1 -1 1 1; #X obj 418 508 tgl 15 0 empty empty 3 3 -6 1 12 -260818 -1 -1 1 1; #X obj 435 508 tgl 15 0 empty empty 4 3 -6 1 12 -260818 -1 -1 1 1; #X obj 452 508 tgl 15 0 empty empty 5 3 -6 1 12 -260818 -1 -1 1 1; #X obj 469 508 tgl 15 0 empty empty 6 3 -6 1 12 -260818 -1 -1 1 1; #X obj 486 508 tgl 15 0 empty empty 7 3 -6 1 12 -260818 -1 -1 1 1; #X obj 503 508 tgl 15 0 empty empty 8 3 -6 1 12 -260818 -1 -1 1 1; #X obj 520 508 tgl 15 0 empty empty 9 3 -6 1 12 -260818 -1 -1 1 1; #X obj 537 508 tgl 15 0 empty empty 10 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 554 508 tgl 15 0 empty empty 11 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 571 508 tgl 15 0 empty empty 12 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 589 508 tgl 15 0 empty empty 13 0 -6 1 12 -260818 -1 -1 1 1 ; #X msg 367 549 pinMode 2 1; #N canvas 163 104 696 323 send-to-arduino------------------- 0; #X obj 49 24 inlet; #X obj 89 24 inlet; #X obj 128 24 inlet; #X obj 168 24 inlet; #X obj 208 24 inlet; #X obj 248 24 inlet; #X obj 287 24 inlet; #X obj 327 24 inlet; #X obj 368 23 inlet; #X obj 408 23 inlet; #X obj 447 23 inlet; #X obj 487 23 inlet; #X obj 527 23 inlet; #X msg 49 66 pinMode 0 $1; #X msg 89 88 pinMode 1 $1; #X msg 128 110 pinMode 2 $1; #X msg 168 130 pinMode 3 $1; #X msg 208 62 pinMode 4 $1; #X msg 248 84 pinMode 5 $1; #X msg 287 106 pinMode 6 $1; #X msg 327 126 pinMode 7 $1; #X msg 368 58 pinMode 8 $1; #X msg 408 80 pinMode 9 $1; #X msg 447 102 pinMode 10 $1; #X msg 487 122 pinMode 11 $1; #X msg 527 50 pinMode 12 $1; #X obj 566 23 inlet; #X msg 566 70 pinMode 13 $1; #X obj 305 282 outlet; #X obj 305 243 trigger bang anything; #X obj 305 196 list prepend set; #X obj 305 220 list trim; #X connect 0 0 13 0; #X connect 1 0 14 0; #X connect 2 0 15 0; #X connect 3 0 16 0; #X connect 4 0 17 0; #X connect 5 0 18 0; #X connect 6 0 19 0; #X connect 7 0 20 0; #X connect 8 0 21 0; #X connect 9 0 22 0; #X connect 10 0 23 0; #X connect 11 0 24 0; #X connect 12 0 25 0; #X connect 13 0 30 0; #X connect 14 0 30 0; #X connect 15 0 30 0; #X connect 16 0 30 0; #X connect 17 0 30 0; #X connect 18 0 30 0; #X connect 19 0 30 0; #X connect 20 0 30 0; #X connect 21 0 30 0; #X connect 22 0 30 0; #X connect 23 0 30 0; #X connect 24 0 30 0; #X connect 25 0 30 0; #X connect 26 0 27 0; #X connect 27 0 30 0; #X connect 29 0 28 0; #X connect 29 1 28 0; #X connect 30 0 31 0; #X connect 31 0 29 0; #X restore 367 527 pd send-to-arduino-------------------; #X text 446 597 here is our Arduino object -->; #X msg 94 466 open 3; #X obj 567 287 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 38 478 close; #X msg 97 311 digital 2 $1; #X msg 187 311 digital 3 $1; #X msg 277 311 digital 4 $1; #X msg 367 311 digital 5 $1; #X msg 457 311 digital 6 $1; #X msg 97 361 digital 7 $1; #X msg 187 361 digital 8 $1; #X msg 277 361 digital 9 $1; #X msg 367 361 digital 10 $1; #X msg 457 361 digital 11 $1; #X msg 567 305 digital 13 $1; #X text 665 306 test with built in LED; #X obj 117 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 144 265 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 192 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 232 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 282 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 631 596 arduino 1; #X obj 575 337 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 575 355 digital 12 $1; #X obj 332 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 359 256 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 407 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 447 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 497 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 34 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1 ; #X obj 85 35 random 200; #X obj 85 62 + 200; #X floatatom 104 92 5 0 0 0 - - -; #X obj 85 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 225 35 random 200; #X obj 225 62 + 200; #X floatatom 244 92 5 0 0 0 - - -; #X obj 225 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 91 metro 200; #X obj 314 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 365 35 random 200; #X obj 365 62 + 200; #X floatatom 384 92 5 0 0 0 - - -; #X obj 365 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 314 91 metro 200; #X obj 454 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 505 35 random 200; #X obj 505 62 + 200; #X floatatom 524 92 5 0 0 0 - - -; #X obj 505 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 454 91 metro 200; #X obj 594 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 645 35 random 200; #X obj 645 62 + 200; #X floatatom 664 92 5 0 0 0 - - -; #X obj 645 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 594 91 metro 200; #X obj 124 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 175 145 random 200; #X obj 175 172 + 200; #X floatatom 194 202 5 0 0 0 - - -; #X obj 175 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 124 201 metro 200; #X obj 264 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 315 145 random 200; #X obj 315 172 + 200; #X floatatom 334 202 5 0 0 0 - - -; #X obj 315 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 264 201 metro 200; #X obj 404 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 455 145 random 200; #X obj 455 172 + 200; #X floatatom 474 202 5 0 0 0 - - -; #X obj 455 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 404 201 metro 200; #X obj 544 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 595 145 random 200; #X obj 595 172 + 200; #X floatatom 614 202 5 0 0 0 - - -; #X obj 595 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 544 201 metro 200; #X obj 684 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 735 145 random 200; #X obj 735 172 + 200; #X floatatom 754 202 5 0 0 0 - - -; #X obj 735 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 34 91 metro 200; #X obj 684 201 metro 200; #X text 621 407 At 7 metros , on-board LED at Pin 13 will light
even when no message is sent. More metros will cause single LED to blink sporadically. If LED is connected to first channel , and that metro is switched off , it will still blink when other metros run.; #X connect 0 0 16 0; #X connect 0 0 15 0; #X connect 0 0 14 0; #X connect 0 0 13 0; #X connect 0 0 12 0; #X connect 0 0 11 0; #X connect 0 0 10 0; #X connect 0 0 9 0; #X connect 0 0 8 0; #X connect 0 0 7 0; #X connect 0 0 6 0; #X connect 0 0 5 0; #X connect 3 0 40 0; #X connect 5 0 18 2; #X connect 6 0 18 3; #X connect 7 0 18 4; #X connect 8 0 18 5; #X connect 9 0 18 6; #X connect 10 0 18 7; #X connect 11 0 18 8; #X connect 12 0 18 9; #X connect 13 0 18 10; #X connect 14 0 18 11; #X connect 15 0 18 12; #X connect 16 0 18 13; #X connect 17 0 1 0; #X connect 18 0 17 0; #X connect 20 0 4 0; #X connect 21 0 33 0; #X connect 22 0 4 0; #X connect 23 0 1 0; #X connect 24 0 1 0; #X connect 25 0 1 0; #X connect 26 0 1 0; #X connect 27 0 1 0; #X connect 28 0 1 0; #X connect 29 0 1 0; #X connect 30 0 1 0; #X connect 31 0 1 0; #X connect 32 0 1 0; #X connect 33 0 1 0; #X connect 35 0 23 0; #X connect 36 0 24 0; #X connect 37 0 25 0; #X connect 38 0 26 0; #X connect 39 0 27 0; #X connect 40 0 2 0; #X connect 41 0 42 0; #X connect 42 0 1 0; #X connect 43 0 28 0; #X connect 44 0 29 0; #X connect 45 0 30 0; #X connect 46 0 31 0; #X connect 47 0 32 0; #X connect 48 0 106 0; #X connect 49 0 50 0; #X connect 50 0 51 0; #X connect 50 0 106 1; #X connect 52 0 49 0; #X connect 53 0 58 0; #X connect 54 0 55 0; #X connect 55 0 56 0; #X connect 55 0 58 1; #X connect 57 0 54 0; #X connect 58 0 36 0; #X connect 59 0 64 0; #X connect 60 0 61 0; #X connect 61 0 62 0; #X connect 61 0 64 1; #X connect 63 0 60 0; #X connect 64 0 37 0; #X connect 65 0 70 0; #X connect 66 0 67 0; #X connect 67 0 68 0; #X connect 67 0 70 1; #X connect 69 0 66 0; #X connect 70 0 38 0; #X connect 71 0 76 0; #X connect 72 0 73 0; #X connect 73 0 74 0; #X connect 73 0 76 1; #X connect 75 0 72 0; #X connect 76 0 39 0; #X connect 77 0 82 0; #X connect 78 0 79 0; #X connect 79 0 80 0; #X connect 79 0 82 1; #X connect 81 0 78 0; #X connect 82 0 43 0; #X connect 83 0 88 0; #X connect 84 0 85 0; #X connect 85 0 86 0; #X connect 85 0 88 1; #X connect 87 0 84 0; #X connect 88 0 44 0; #X connect 89 0 94 0; #X connect 90 0 91 0; #X connect 91 0 92 0; #X connect 91 0 94 1; #X connect 93 0 90 0; #X connect 94 0 45 0; #X connect 95 0 100 0; #X connect 96 0 97 0; #X connect 97 0 98 0; #X connect 97 0 100 1; #X connect 99 0 96 0; #X connect 100 0 46 0; #X connect 101 0 107 0; #X connect 102 0 103 0; #X connect 103 0 104 0; #X connect 103 0 107 1; #X connect 105 0 102 0; #X connect 106 0 35 0; #X connect 107 0 47 0; _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
------- There is no way to peace, peace is the way. -A.J. Muste
-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/ macumbista ---Oblique Strategy # 113: "Make a blank valuable by putting it in an exquisite frame"
You can't steal a gift. Bird gave the world his music, and if you can
hear it, you can have it. - Dizzy Gillespie
2008/10/8 Derek Holzer derek@umatic.nl
Problem remains the same after upgrade. Looks like I or probably a friend have to write some custom firmware for this project before tomorrow.
Hello.
There's a very easy way to do this in custom firmware with raw arduino code, using a shift out chip very cheap and easy too find - 74HC595
there's a tutorial here - http://www.arduino.cc/en/Tutorial/ShiftOut
I used this a lot of times and actually I'm using right now in a project, and works very fine. Uses only 3 arduino digital outs.
abração
glerm
I used this a lot of times and actually I'm using right now in a project, and works very fine. Uses only 3 arduino digital outs.
for example, in this beat sequencer... http://organismo.art.br/blog/?p=2618
Just in case anyone's curious, here's how the problem was solved. The task, if you recall, was independent control of 10 blinking LEDs from the digital outs of the Arduino. I ditched the Firmata and used some basic Arduino example code instead. LEDs draw about 8.5 mA each in the end (using Kingbright ultra bright reds with 330R resistor) so it's quite safe to run the whole thing from USB power even.
Arduino code and test patch attached.
best! Derek
int val;
void setup() { Serial.begin(115200); pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, OUTPUT); pinMode(6, OUTPUT); pinMode(7, OUTPUT); pinMode(8, OUTPUT); pinMode(9, OUTPUT); pinMode(10, OUTPUT); pinMode(11, OUTPUT); }
void loop() { if (Serial.available()) { val = Serial.read(); switch (val) { case 2: digitalWrite(2, HIGH); break; case 3: digitalWrite(3, HIGH); break; case 4: digitalWrite(4, HIGH); break; case 5: digitalWrite(5, HIGH); break; case 6: digitalWrite(6, HIGH); break; case 7: digitalWrite(7, HIGH); break; case 8: digitalWrite(8, HIGH); break; case 9: digitalWrite(9, HIGH); break; case 10: digitalWrite(10, HIGH); break; case 11: digitalWrite(11, HIGH); break; case 12: digitalWrite(2, LOW); break; case 13: digitalWrite(3, LOW); break; case 14: digitalWrite(4, LOW); break; case 15: digitalWrite(5, LOW); break; case 16: digitalWrite(6, LOW); break; case 17: digitalWrite(7, LOW); break; case 18: digitalWrite(8, LOW); break; case 19: digitalWrite(9, LOW); break; case 20: digitalWrite(10, LOW); break; case 21: digitalWrite(11, LOW); break;
}
} }
Thanks for that patch, it was very helpful in tracking down the bug.
I figured it out and fixed it. Please try it again:
http://pure-data.svn.sourceforge.net/viewvc/pure-data/trunk/externals/ hardware/arduino/arduino.pd?view=log
.hc
On Oct 8, 2008, at 11:59 AM, Derek Holzer wrote:
Attached is a diagnostic patch which demonstrates the problem. This
problem can be demonstrated using only the Arduino board with a
single LED (plus current reducing resistor of 1.5K) connected from
pin 2 to GND.At 7 simultaneous [metro]s, the on-board LED at Pin 13 starts to
blink, even when it has not been sent any messages. After that, a
single LED on Pin 2 will start to blink sporadically, especially
with more randomized [metro] intervals. If the [metro] controlling
the LED on Pin 2 is switched off, it will continue to blink if
other [metro]s are running.Clearly this is a case of message collisions, even though the
[comport] object does not report any TX-OVERRUNS.I'm not too skilled with writing code for the Arduino, so I have no
way of running something standalone right now to see if it can be
isolated from the board.I'd really like to have a solution or workaround to this problem,
as it's quite an unexpected bug!!!!thanks + best! Derek
Charles Henry wrote:
On Wed, Oct 8, 2008 at 9:38 AM, Derek Holzer derek@umatic.nl wrote:
The blink interval is something in the area of 200-500 miliseconds, certainly slow enough for the comport. Could it be trouble with
some of the objects in the [arduino] abstraction?Hi, Derek, One thought that occurred to me: it takes around 16-20 ms to send a message to the arduino and recieve a message back (which has to do with the FTDI chip). This is a round-trip time--I'm not sure what
the delay time is like for data traffic going in one way. Perhaps those delays are adding up, when you've got 10 separate LEDs to control? Have you considered making a test program on the arduino to blink the LEDs at different rates and see if the problem persists? That would isolate the communications from the actions performed. Chuck-- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/ macumbista ---Oblique Strategy # 70: "Feedback recordings into an acoustic situation" #N canvas 0 22 1000 776 10; #X obj 152 528 tgl 20 0 empty empty all 1 12 0 11 -261682 -1 -1 1 1 ; #X obj 374 641 send $0-arduino; #X obj 631 617 send $0-arduino-out; #X obj 631 573 receive $0-arduino; #X obj 94 637 send $0-arduino; #X obj 401 508 tgl 15 0 empty empty 2 3 -6 1 12 -260818 -1 -1 1 1; #X obj 418 508 tgl 15 0 empty empty 3 3 -6 1 12 -260818 -1 -1 1 1; #X obj 435 508 tgl 15 0 empty empty 4 3 -6 1 12 -260818 -1 -1 1 1; #X obj 452 508 tgl 15 0 empty empty 5 3 -6 1 12 -260818 -1 -1 1 1; #X obj 469 508 tgl 15 0 empty empty 6 3 -6 1 12 -260818 -1 -1 1 1; #X obj 486 508 tgl 15 0 empty empty 7 3 -6 1 12 -260818 -1 -1 1 1; #X obj 503 508 tgl 15 0 empty empty 8 3 -6 1 12 -260818 -1 -1 1 1; #X obj 520 508 tgl 15 0 empty empty 9 3 -6 1 12 -260818 -1 -1 1 1; #X obj 537 508 tgl 15 0 empty empty 10 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 554 508 tgl 15 0 empty empty 11 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 571 508 tgl 15 0 empty empty 12 0 -6 1 12 -260818 -1 -1 1 1 ; #X obj 589 508 tgl 15 0 empty empty 13 0 -6 1 12 -260818 -1 -1 1 1 ; #X msg 367 549 pinMode 2 1; #N canvas 163 104 696 323 send-to-arduino------------------- 0; #X obj 49 24 inlet; #X obj 89 24 inlet; #X obj 128 24 inlet; #X obj 168 24 inlet; #X obj 208 24 inlet; #X obj 248 24 inlet; #X obj 287 24 inlet; #X obj 327 24 inlet; #X obj 368 23 inlet; #X obj 408 23 inlet; #X obj 447 23 inlet; #X obj 487 23 inlet; #X obj 527 23 inlet; #X msg 49 66 pinMode 0 $1; #X msg 89 88 pinMode 1 $1; #X msg 128 110 pinMode 2 $1; #X msg 168 130 pinMode 3 $1; #X msg 208 62 pinMode 4 $1; #X msg 248 84 pinMode 5 $1; #X msg 287 106 pinMode 6 $1; #X msg 327 126 pinMode 7 $1; #X msg 368 58 pinMode 8 $1; #X msg 408 80 pinMode 9 $1; #X msg 447 102 pinMode 10 $1; #X msg 487 122 pinMode 11 $1; #X msg 527 50 pinMode 12 $1; #X obj 566 23 inlet; #X msg 566 70 pinMode 13 $1; #X obj 305 282 outlet; #X obj 305 243 trigger bang anything; #X obj 305 196 list prepend set; #X obj 305 220 list trim; #X connect 0 0 13 0; #X connect 1 0 14 0; #X connect 2 0 15 0; #X connect 3 0 16 0; #X connect 4 0 17 0; #X connect 5 0 18 0; #X connect 6 0 19 0; #X connect 7 0 20 0; #X connect 8 0 21 0; #X connect 9 0 22 0; #X connect 10 0 23 0; #X connect 11 0 24 0; #X connect 12 0 25 0; #X connect 13 0 30 0; #X connect 14 0 30 0; #X connect 15 0 30 0; #X connect 16 0 30 0; #X connect 17 0 30 0; #X connect 18 0 30 0; #X connect 19 0 30 0; #X connect 20 0 30 0; #X connect 21 0 30 0; #X connect 22 0 30 0; #X connect 23 0 30 0; #X connect 24 0 30 0; #X connect 25 0 30 0; #X connect 26 0 27 0; #X connect 27 0 30 0; #X connect 29 0 28 0; #X connect 29 1 28 0; #X connect 30 0 31 0; #X connect 31 0 29 0; #X restore 367 527 pd send-to-arduino-------------------; #X text 446 597 here is our Arduino object -->; #X msg 94 466 open 3; #X obj 567 287 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 38 478 close; #X msg 97 311 digital 2 $1; #X msg 187 311 digital 3 $1; #X msg 277 311 digital 4 $1; #X msg 367 311 digital 5 $1; #X msg 457 311 digital 6 $1; #X msg 97 361 digital 7 $1; #X msg 187 361 digital 8 $1; #X msg 277 361 digital 9 $1; #X msg 367 361 digital 10 $1; #X msg 457 361 digital 11 $1; #X msg 567 305 digital 13 $1; #X text 665 306 test with built in LED; #X obj 117 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 144 265 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 192 264 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 232 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 282 263 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 631 596 arduino 1; #X obj 575 337 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X msg 575 355 digital 12 $1; #X obj 332 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 359 256 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 407 255 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 447 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 497 254 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 34 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1 ; #X obj 85 35 random 200; #X obj 85 62 + 200; #X floatatom 104 92 5 0 0 0 - - -; #X obj 85 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 225 35 random 200; #X obj 225 62 + 200; #X floatatom 244 92 5 0 0 0 - - -; #X obj 225 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 174 91 metro 200; #X obj 314 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 0 1; #X obj 365 35 random 200; #X obj 365 62 + 200; #X floatatom 384 92 5 0 0 0 - - -; #X obj 365 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 314 91 metro 200; #X obj 454 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 505 35 random 200; #X obj 505 62 + 200; #X floatatom 524 92 5 0 0 0 - - -; #X obj 505 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 454 91 metro 200; #X obj 594 57 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 645 35 random 200; #X obj 645 62 + 200; #X floatatom 664 92 5 0 0 0 - - -; #X obj 645 12 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 594 91 metro 200; #X obj 124 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 175 145 random 200; #X obj 175 172 + 200; #X floatatom 194 202 5 0 0 0 - - -; #X obj 175 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 124 201 metro 200; #X obj 264 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 315 145 random 200; #X obj 315 172 + 200; #X floatatom 334 202 5 0 0 0 - - -; #X obj 315 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 264 201 metro 200; #X obj 404 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 455 145 random 200; #X obj 455 172 + 200; #X floatatom 474 202 5 0 0 0 - - -; #X obj 455 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 404 201 metro 200; #X obj 544 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 595 145 random 200; #X obj 595 172 + 200; #X floatatom 614 202 5 0 0 0 - - -; #X obj 595 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 544 201 metro 200; #X obj 684 167 tgl 15 0 empty empty empty 0 -6 0 10 -262144 -1 -1 1 1; #X obj 735 145 random 200; #X obj 735 172 + 200; #X floatatom 754 202 5 0 0 0 - - -; #X obj 735 122 bng 15 250 50 0 empty empty empty 0 -6 0 10 -262144 -1 -1; #X obj 34 91 metro 200; #X obj 684 201 metro 200; #X text 621 407 At 7 metros , on-board LED at Pin 13 will light even when no message is sent. More metros will cause single LED to blink sporadically. If LED is connected to first channel , and that metro is switched off , it will still blink when other metros run.; #X connect 0 0 16 0; #X connect 0 0 15 0; #X connect 0 0 14 0; #X connect 0 0 13 0; #X connect 0 0 12 0; #X connect 0 0 11 0; #X connect 0 0 10 0; #X connect 0 0 9 0; #X connect 0 0 8 0; #X connect 0 0 7 0; #X connect 0 0 6 0; #X connect 0 0 5 0; #X connect 3 0 40 0; #X connect 5 0 18 2; #X connect 6 0 18 3; #X connect 7 0 18 4; #X connect 8 0 18 5; #X connect 9 0 18 6; #X connect 10 0 18 7; #X connect 11 0 18 8; #X connect 12 0 18 9; #X connect 13 0 18 10; #X connect 14 0 18 11; #X connect 15 0 18 12; #X connect 16 0 18 13; #X connect 17 0 1 0; #X connect 18 0 17 0; #X connect 20 0 4 0; #X connect 21 0 33 0; #X connect 22 0 4 0; #X connect 23 0 1 0; #X connect 24 0 1 0; #X connect 25 0 1 0; #X connect 26 0 1 0; #X connect 27 0 1 0; #X connect 28 0 1 0; #X connect 29 0 1 0; #X connect 30 0 1 0; #X connect 31 0 1 0; #X connect 32 0 1 0; #X connect 33 0 1 0; #X connect 35 0 23 0; #X connect 36 0 24 0; #X connect 37 0 25 0; #X connect 38 0 26 0; #X connect 39 0 27 0; #X connect 40 0 2 0; #X connect 41 0 42 0; #X connect 42 0 1 0; #X connect 43 0 28 0; #X connect 44 0 29 0; #X connect 45 0 30 0; #X connect 46 0 31 0; #X connect 47 0 32 0; #X connect 48 0 106 0; #X connect 49 0 50 0; #X connect 50 0 51 0; #X connect 50 0 106 1; #X connect 52 0 49 0; #X connect 53 0 58 0; #X connect 54 0 55 0; #X connect 55 0 56 0; #X connect 55 0 58 1; #X connect 57 0 54 0; #X connect 58 0 36 0; #X connect 59 0 64 0; #X connect 60 0 61 0; #X connect 61 0 62 0; #X connect 61 0 64 1; #X connect 63 0 60 0; #X connect 64 0 37 0; #X connect 65 0 70 0; #X connect 66 0 67 0; #X connect 67 0 68 0; #X connect 67 0 70 1; #X connect 69 0 66 0; #X connect 70 0 38 0; #X connect 71 0 76 0; #X connect 72 0 73 0; #X connect 73 0 74 0; #X connect 73 0 76 1; #X connect 75 0 72 0; #X connect 76 0 39 0; #X connect 77 0 82 0; #X connect 78 0 79 0; #X connect 79 0 80 0; #X connect 79 0 82 1; #X connect 81 0 78 0; #X connect 82 0 43 0; #X connect 83 0 88 0; #X connect 84 0 85 0; #X connect 85 0 86 0; #X connect 85 0 88 1; #X connect 87 0 84 0; #X connect 88 0 44 0; #X connect 89 0 94 0; #X connect 90 0 91 0; #X connect 91 0 92 0; #X connect 91 0 94 1; #X connect 93 0 90 0; #X connect 94 0 45 0; #X connect 95 0 100 0; #X connect 96 0 97 0; #X connect 97 0 98 0; #X connect 97 0 100 1; #X connect 99 0 96 0; #X connect 100 0 46 0; #X connect 101 0 107 0; #X connect 102 0 103 0; #X connect 103 0 104 0; #X connect 103 0 107 1; #X connect 105 0 102 0; #X connect 106 0 35 0; #X connect 107 0 47 0; _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
As we enjoy great advantages from inventions of others, we should be
glad of an opportunity to serve others by any invention of ours; and
this we should do freely and generously. - Benjamin Franklin
Maybe with 8 or more LEDs you are pulling too much current and the board is resetting or doing flakey things because its power supply is glitching. Especially if you are powering it from USB.
Martin
Derek Holzer wrote:
I'm using the new Pduino 0.4beta2 and Firmata0.4beta3 with Pd-Extended 0.39 and 0.40 and an Arduino NG (Atmega16 IC) to control 10 separate LEDs via the Digital Write pins 2-12. Each has the possibility to blink at a different speed. What I've discovered is that if I have more than 6 or 7 LEDs blinking at different speeds, there is cross-talk between the channels causing the LEDs to blink at wrong intervals (but not in unison), including the onboard one on the Arduino board on Pin 13 which I'm not even sending messages to!
I don't believe it is an electrical problem, as the wiring is quite simple and I decoupled the outputs to the LEDs after the problem first occurred. In fact, the problem persists even when I remove any and all of my own electronics from the circuit!
The blink interval is something in the area of 200-500 miliseconds, certainly slow enough for the comport. Could it be trouble with some of the objects in the [arduino] abstraction?
Any and all suggestions appreciated, as this project needs to go out the door tomorrow morning! best, Derek -- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista ---Oblique Strategy # 95: "Is something missing?"
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Martin,
I checked the draw of each LED, and it's about 15 mA. Should be enough when the Arduino can take 300 mA, but like I said the problem persists even when all my electronics are disconnected. And so far I've only tested it with one LED plugged in, trying each channel individually. Seems more like message collisions, as Charles mentioned.
thx, D.
Martin Peach wrote:
Maybe with 8 or more LEDs you are pulling too much current and the board is resetting or doing flakey things because its power supply is glitching. Especially if you are powering it from USB.
Martin
Derek Holzer wrote:
I'm using the new Pduino 0.4beta2 and Firmata0.4beta3 with Pd-Extended 0.39 and 0.40 and an Arduino NG (Atmega16 IC) to control 10 separate LEDs via the Digital Write pins 2-12. Each has the possibility to blink at a different speed. What I've discovered is that if I have more than 6 or 7 LEDs blinking at different speeds, there is cross-talk between the channels causing the LEDs to blink at wrong intervals (but not in unison), including the onboard one on the Arduino board on Pin 13 which I'm not even sending messages to!
I don't believe it is an electrical problem, as the wiring is quite simple and I decoupled the outputs to the LEDs after the problem first occurred. In fact, the problem persists even when I remove any and all of my own electronics from the circuit!
The blink interval is something in the area of 200-500 miliseconds, certainly slow enough for the comport. Could it be trouble with some of the objects in the [arduino] abstraction?
Any and all suggestions appreciated, as this project needs to go out the door tomorrow morning! best, Derek -- derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista ---Oblique Strategy # 95: "Is something missing?"
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list