Re: [PD] pduino test patch: old analog/digital controls
heho i just put my attempt for a solution considering this pin numbering confusion into github: https://github.com/reduzent/pduino take a look if time and leisure permitting - I'm herewith opening the suggestion box! thanks in advance salutis ø On 11/09/2011 09:54 AM, olsen wrote: Thanks Hans for making this thing clear - I'll try to find an adequate solution for the rewritten pduino-help asap! best ø On 11/03/2011 03:39 PM, Hans-Christoph Steiner wrote: That confusion originates from the Arduino numbering scheme itself, since it uses A0 for analog pins in analog mode, but then it uses a number when using the same pin for digital things. I think one way to represent this might be to allow the use of A0-A7 pin names in addition to the numbers, but then the confusing thing would be that the analog messages would then be [analog 14 0.2352(. So that's why I thought to try to use only the numbers, no A0-A7, and try to make that as understandable as possible. .hc On Nov 3, 2011, at 6:57 AM, olsen wrote: yo bonitos due to the pduino rewrite I've to reanimate this threat ;) I would like to remove the ambiguity and confusion about this old and new way of enabling the analog pins. old way of enabling the analog 0 pin is sending the following to the arduino object: [analogIns 0 1( enabling the same pin(analog 0) the new school way: [pinMode 14 analog( is this correct? if so what's a bit byte confusing for people is that in the new way pin 14 equals the analog 0 pin - guess this is a peculiarity of firmata? isn't there a possability to use f.e. A0-A5 for adressing the analog pins? thanks for info salutis ø On 06/17/2011 10:52 AM, olsen wrote: On 06/17/2011 12:24 AM, Matteo Sisti Sette wrote: On 06/16/2011 05:44 PM, olsen wrote: it's all in the arduino-help.pd by Gerda Strobl and Georg Holzmann! Which one??? Not the one that is distributed together with [arduino] and [arduino-test] at http://at.or.at/hans/pd/objects.html, right? yo it's in Pduino-0.5beta8 linked on this page in the last subpatch [pd SWITCHING-INPUTS] you'll find the apropriate messages. There I find the same analogIns messages that are supposed to be the old ones (but are the only ones I've found that work for analog pins with the latest version of Firmata) jep i agree they're the same - i think it's a matter of wrong denotation so due to my knowledge there's nothing like old and newer messages - the current 'contemporary' message for enabling the analog inputs is: [analogIns pinumber 1=on; 0=off( f.e. to enable analog pin 1: [analogIns 1 1( correct me if i'm wrong! i don't know why this is commented with (optional) I must have another version of the help patch, as I don't see such a comment right behind the [pd SWITCHING-INPUTS] is a comment - example of switching inputs on and off (optional) How are the messages you're talking about? i guess it's a firmata peculiarity that you've explicit have to enable the analog pins as in arduino they are enabled by default - but correct me if i'm wrong. Yes, I guess what you have to explicitly enable is to have the firmware _send_ the values to the computer. It would be undesirable to have a constant flood of values of all pins whether you use them or not. jep right so with firmata the analogIns have to be enabled explicitly to use them. i think the (optional) comment somehow makes it ambiguous. as told i'll try to consider this in the improvements we're working on! salutis ø -- ETs DNA will not be televised http://hasa-labs.org There is no way to peace, peace is the way. -A.J. Muste -- ETs DNA will not be televised http://hasa-labs.org ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] GridFlow slowness
Le 2011-11-23 à 01:11:00, Matteo Sisti Sette a écrit : But do any of these factors change when using an interpreted language or environment as opposed to doing this natively (e.g. in C++)? It depends on how much the interpreted language is actually compiled, and how it interacts with « less compiled » parts. In Pd, nearly every piece of external or internal class is written in C or C++, and all abstractions are written in an interpreted language named Pd. Some other externals are written in other languages (Tcl, Lua, Python, etc., and formerly I was using Ruby). This means that some parts are fast and some parts are slow. Now, if you give to a C/C++ part a large piece of work at a time, you're using much less CPU than if you cut it into tiny pieces. That's one big difference between using, say, [list-drip] vs [foreach], but it's even more the case if you do many [+] (without [list-map]) vs one big [# +]. ([list-map] is actually much slower than what it is possible to do as a plain abstraction without deps, so that's why I say without [list-map]) Pd itself is probably among the slowest interpreted languages when you look at the message system. The interpreter still preparses everything and objects are mostly connected to each other as a graph. Symbol-table-lookup is used fairly seldom, and that helps making it not so slow. Using a rule of thumb, Pd should be faster than languages that reparse everything all of the time, such as Bash, and very old versions of Tcl until version 8 (which came out in 1997). Pd's DSP is faster. It involves processing data in larger chunks of 64 floats by default (see above about too many tiny pieces) and it compiles patches as «wordcode», which is similar in speed to bytecode (such as Perl/Python), and usually somewhat faster than object graphs (such as Pd's message system and Ruby). Then Java... Java is somewhat special. The oldest versions used plain bytecode (as in the original versions of Smalltalk), but when doing so, it was often slower than Tcl8/Perl/Python, because it interpreted each character operation separately, whereas Tcl8/Perl/Python bytecodes work on whole strings at once. It's again the problem of too many tiny pieces. However, Java is nowadays almost always used with the JNI, which is a model it got from the SELF language. It's actually nearly as old as Java bytecode. Improvements in JNI made Java come supposedly close to the speed of C++, though there are still other ways in which Java needs more resources than C++. I mean, when the bottlenecks of copying ram are discussed, I sometimes get the impression that I'm being told: this is the part of code where the overhead of doing things in java (or whatever) rather than c++ is biggest, which is what I find counterintuitive. Or is it just a misunderstanding of mine? I don't know how fast Java compilers are supposed to be right now. I have never tried serious number-crunching in Java. All I can tell you is to find a benchmark. Results will vary depending on the task being performed, which compiler/runtime-env is being used, and lots of small details in how each programme is written in each language. __ | Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] GridFlow slowness
- Original Message - From: Mathieu Bouchard ma...@artengine.ca To: Matteo Sisti Sette matteosistise...@gmail.com Cc: PD-List pd-list@iem.at; gridflow-...@artengine.ca Sent: Thursday, November 24, 2011 12:33 PM Subject: Re: [PD] GridFlow slowness Le 2011-11-23 à 01:11:00, Matteo Sisti Sette a écrit : But do any of these factors change when using an interpreted language or environment as opposed to doing this natively (e.g. in C++)? It depends on how much the interpreted language is actually compiled, and how it interacts with « less compiled » parts. In Pd, nearly every piece of external or internal class is written in C or C++, and all abstractions are written in an interpreted language named Pd. Some other externals are written in other languages (Tcl, Lua, Python, etc., and formerly I was using Ruby). Is there a way to take a pd patch and compile it to c or c++ or something? This means that some parts are fast and some parts are slow. Now, if you give to a C/C++ part a large piece of work at a time, you're using much less CPU than if you cut it into tiny pieces. That's one big difference between using, say, [list-drip] vs [foreach], but it's even more the case if you do many [+] (without [list-map]) vs one big [# +]. ([list-map] is actually much slower than what it is possible to do as a plain abstraction without deps, so that's why I say without [list-map]) Pd itself is probably among the slowest interpreted languages when you look at the message system. The interpreter still preparses everything and objects are mostly connected to each other as a graph. Symbol-table-lookup is used fairly seldom, and that helps making it not so slow. Using a rule of thumb, Pd should be faster than languages that reparse everything all of the time, such as Bash, and very old versions of Tcl until version 8 (which came out in 1997). Pd's DSP is faster. It involves processing data in larger chunks of 64 floats by default (see above about too many tiny pieces) and it compiles patches as «wordcode», What is wordcode? Is that what's happening in d_ugen.c? which is similar in speed to bytecode (such as Perl/Python), and usually somewhat faster than object graphs (such as Pd's message system and Ruby). Then Java... Java is somewhat special. The oldest versions used plain bytecode (as in the original versions of Smalltalk), but when doing so, it was often slower than Tcl8/Perl/Python, because it interpreted each character operation separately, whereas Tcl8/Perl/Python bytecodes work on whole strings at once. It's again the problem of too many tiny pieces. However, Java is nowadays almost always used with the JNI, which is a model it got from the SELF language. It's actually nearly as old as Java bytecode. Improvements in JNI made Java come supposedly close to the speed of C++, though there are still other ways in which Java needs more resources than C++. I mean, when the bottlenecks of copying ram are discussed, I sometimes get the impression that I'm being told: this is the part of code where the overhead of doing things in java (or whatever) rather than c++ is biggest, which is what I find counterintuitive. Or is it just a misunderstanding of mine? I don't know how fast Java compilers are supposed to be right now. I have never tried serious number-crunching in Java. All I can tell you is to find a benchmark. Results will vary depending on the task being performed, which compiler/runtime-env is being used, and lots of small details in how each programme is written in each language. __ | Mathieu BOUCHARD - téléphone : +1.514.383.3801 - Montréal, QC ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] controlling camera with mouse
Hi, i would like to know if there is something as the peasycam library for processing in pd/gem. With this library you can control the camera with the mouse. Which should be the best way of replicating this in puredata with Gem? http://mrfeinberg.com/peasycam/ Thanks R. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] GridFlow slowness
On 11/24/2011 07:04 PM, Jonathan Wilkes wrote: Is there a way to take a pd patch and compile it to c or c++ or something? i remember a poster presentation at nime 2008 about a Pd-to-C compiler. only built-ins could be used (no externals), and i cannot remember whether it was possible to use abstractions. they claimed lots of speedup, but that might have been only when it comes to plain DSP. i never tried it myself, though. gfmasdr IOhannes signature.asc Description: OpenPGP digital signature ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] arduino question
Hi I am using a PIR sensor with pduino playground and I have the sensor picking up movement. It's my first pd-arduino excursion so forgive the noobie-ness. When I get the out form the PIR sensor it give me a constant value of SOMETHING The entire time. It's output values range from 0.13-0.664/0.665 constantly. I just want to use the sensor to turn off/on a sample but the file is constantly being banged a value. How do I just out put an on/off based upon this constant stream of Data? I tried select bit that does seem to be working. It's a simple parallax PIR sensor and I have been having good luck getting usd to wiring and the breadboard etc. but when I take the analog0 stream/port into pd I do not know how to control that data/ Any help? pp ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] arduino question
that kind of works but after it sends it's message to bang something the PIRturns off when the sensor goes off and it sends another value is there a way to ignore that? pp From: Dafydd Hughes [dafyd...@gmail.com] Sent: Thursday, November 24, 2011 10:43 PM To: Pagano, Patrick Subject: Re: [PD] arduino question Hi Patrick Are you trying to turn the sample on/off by comparing it to a range? If so, have you tried something like: [ 0.3] | [change] ? cheers dafydd On Thu, Nov 24, 2011 at 10:31 PM, Pagano, Patrick p...@digitalworlds.ufl.edumailto:p...@digitalworlds.ufl.edu wrote: Hi I am using a PIR sensor with pduino playground and I have the sensor picking up movement. It's my first pd-arduino excursion so forgive the noobie-ness. When I get the out form the PIR sensor it give me a constant value of SOMETHING The entire time. It's output values range from 0.13-0.664/0.665 constantly. I just want to use the sensor to turn off/on a sample but the file is constantly being banged a value. How do I just out put an on/off based upon this constant stream of Data? I tried select bit that does seem to be working. It's a simple parallax PIR sensor and I have been having good luck getting usd to wiring and the breadboard etc. but when I take the analog0 stream/port into pd I do not know how to control that data/ Any help? pp ___ Pd-list@iem.atmailto:Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] arduino question/bang once
Well after restarting Arduino and pd i am getting values to reside between 0 and 1 from the PIR so i can hook up a select to the r_ANA_0 but when i trigger the sensor it continually bangs for the 10 seconds that the sensor is on, is there a way to only bang once? pp From: pd-list-boun...@iem.at [pd-list-boun...@iem.at] on behalf of Pagano, Patrick [p...@digitalworlds.ufl.edu] Sent: Thursday, November 24, 2011 11:28 PM To: Dafydd Hughes Cc: pd-list@iem.at Subject: Re: [PD] arduino question that kind of works but after it sends it's message to bang something the PIRturns off when the sensor goes off and it sends another value is there a way to ignore that? pp From: Dafydd Hughes [dafyd...@gmail.com] Sent: Thursday, November 24, 2011 10:43 PM To: Pagano, Patrick Subject: Re: [PD] arduino question Hi Patrick Are you trying to turn the sample on/off by comparing it to a range? If so, have you tried something like: [ 0.3] | [change] ? cheers dafydd On Thu, Nov 24, 2011 at 10:31 PM, Pagano, Patrick p...@digitalworlds.ufl.edumailto:p...@digitalworlds.ufl.edu wrote: Hi I am using a PIR sensor with pduino playground and I have the sensor picking up movement. It's my first pd-arduino excursion so forgive the noobie-ness. When I get the out form the PIR sensor it give me a constant value of SOMETHING The entire time. It's output values range from 0.13-0.664/0.665 constantly. I just want to use the sensor to turn off/on a sample but the file is constantly being banged a value. How do I just out put an on/off based upon this constant stream of Data? I tried select bit that does seem to be working. It's a simple parallax PIR sensor and I have been having good luck getting usd to wiring and the breadboard etc. but when I take the analog0 stream/port into pd I do not know how to control that data/ Any help? pp ___ Pd-list@iem.atmailto:Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] arduino question
That was messy so let me be clear i have a pir sensor hooked up, in arduino you load firmata code to work with pduino_playaround, not necesarily the PIR sense code into arduino. but the problem is that the sensor is constantly sending a bang whether it's of 0, or on 1. Is there a way to just get one bang from the sensor not constant banging? I tried oneshot and that does not work right either From: pd-list-boun...@iem.at [pd-list-boun...@iem.at] on behalf of Pagano, Patrick [p...@digitalworlds.ufl.edu] Sent: Friday, November 25, 2011 12:04 AM To: Dafydd Hughes Cc: pd-list@iem.at Subject: Re: [PD] arduino question Kind of. I am still a newbie to this but i have been using pduino_playaround. So are you suggesting removing the second value that is sent by Arduino? What is happening is that pd receives the on from the sensor and keeps baninging until the sensor turns off and then it sends another bang when it turns off so if the sensor turns it on it eventually bangs again and resets to 0 again. whereas i just want it to send bang when it's activated to play a sound and not band when it's done. pp From: Dafydd Hughes [dafyd...@gmail.com] Sent: Friday, November 25, 2011 12:00 AM To: Pagano, Patrick Cc: pd-list@iem.at Subject: Re: [PD] arduino question You know what? I'm not sure. I've never worked with those sensors. What do you mean by message to bang? are you doing a call-and-response between Pd and the Arduino? Are you working with this sketch? http://www.arduino.cc/playground/Code/PIRsense On Thu, Nov 24, 2011 at 11:28 PM, Pagano, Patrick p...@digitalworlds.ufl.edumailto:p...@digitalworlds.ufl.edu wrote: that kind of works but after it sends it's message to bang something the PIRturns off when the sensor goes off and it sends another value is there a way to ignore that? pp From: Dafydd Hughes [dafyd...@gmail.commailto:dafyd...@gmail.com] Sent: Thursday, November 24, 2011 10:43 PM To: Pagano, Patrick Subject: Re: [PD] arduino question Hi Patrick Are you trying to turn the sample on/off by comparing it to a range? If so, have you tried something like: [ 0.3] | [change] ? cheers dafydd On Thu, Nov 24, 2011 at 10:31 PM, Pagano, Patrick p...@digitalworlds.ufl.edumailto:p...@digitalworlds.ufl.edu wrote: Hi I am using a PIR sensor with pduino playground and I have the sensor picking up movement. It's my first pd-arduino excursion so forgive the noobie-ness. When I get the out form the PIR sensor it give me a constant value of SOMETHING The entire time. It's output values range from 0.13-0.664/0.665 constantly. I just want to use the sensor to turn off/on a sample but the file is constantly being banged a value. How do I just out put an on/off based upon this constant stream of Data? I tried select bit that does seem to be working. It's a simple parallax PIR sensor and I have been having good luck getting usd to wiring and the breadboard etc. but when I take the analog0 stream/port into pd I do not know how to control that data/ Any help? pp ___ Pd-list@iem.atmailto:Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] arduino question
Hi Patrick Do you mean you only want a bang when the sensor turns on? What do the messages look like coming from the arduino? What is that second value? I hope I'm able to help here! cheers dafydd On Fri, Nov 25, 2011 at 12:04 AM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: Kind of. I am still a newbie to this but i have been using pduino_playaround. So are you suggesting removing the second value that is sent by Arduino? What is happening is that pd receives the on from the sensor and keeps baninging until the sensor turns off and then it sends another bang when it turns off so if the sensor turns it on it eventually bangs again and resets to 0 again. whereas i just want it to send bang when it's activated to play a sound and not band when it's done. pp -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Friday, November 25, 2011 12:00 AM *To:* Pagano, Patrick *Cc:* pd-list@iem.at *Subject:* Re: [PD] arduino question You know what? I'm not sure. I've never worked with those sensors. What do you mean by message to bang? are you doing a call-and-response between Pd and the Arduino? Are you working with this sketch? http://www.arduino.cc/playground/Code/PIRsense On Thu, Nov 24, 2011 at 11:28 PM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: that kind of works but after it sends it's message to bang something the PIRturns off when the sensor goes off and it sends another value is there a way to ignore that? pp -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Thursday, November 24, 2011 10:43 PM *To:* Pagano, Patrick *Subject:* Re: [PD] arduino question Hi Patrick Are you trying to turn the sample on/off by comparing it to a range? If so, have you tried something like: [ 0.3] | [change] ? cheers dafydd On Thu, Nov 24, 2011 at 10:31 PM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: Hi I am using a PIR sensor with pduino playground and I have the sensor picking up movement. It's my first pd-arduino excursion so forgive the noobie-ness. When I get the out form the PIR sensor it give me a constant value of SOMETHING The entire time. It's output values range from 0.13-0.664/0.665 constantly. I just want to use the sensor to turn off/on a sample but the file is constantly being banged a value. How do I just out put an on/off based upon this constant stream of Data? I tried select bit that does seem to be working. It's a simple parallax PIR sensor and I have been having good luck getting usd to wiring and the breadboard etc. but when I take the analog0 stream/port into pd I do not know how to control that data/ Any help? pp ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] arduino question
Oh cool - is this your stuff coming out of ANA_0? On Fri, Nov 25, 2011 at 12:16 AM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: it's a number box that is constantly sending 0 or 1 depending on whether the sensor is on or off. the value is a constant stream and i am just unsure how to just get ONE bang when it's turned on and ignore the 0 bang when it turns off. -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Friday, November 25, 2011 12:12 AM *To:* Pagano, Patrick *Cc:* pd-list@iem.at *Subject:* Re: [PD] arduino question Hi Patrick Do you mean you only want a bang when the sensor turns on? What do the messages look like coming from the arduino? What is that second value? I hope I'm able to help here! cheers dafydd On Fri, Nov 25, 2011 at 12:04 AM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: Kind of. I am still a newbie to this but i have been using pduino_playaround. So are you suggesting removing the second value that is sent by Arduino? What is happening is that pd receives the on from the sensor and keeps baninging until the sensor turns off and then it sends another bang when it turns off so if the sensor turns it on it eventually bangs again and resets to 0 again. whereas i just want it to send bang when it's activated to play a sound and not band when it's done. pp -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Friday, November 25, 2011 12:00 AM *To:* Pagano, Patrick *Cc:* pd-list@iem.at *Subject:* Re: [PD] arduino question You know what? I'm not sure. I've never worked with those sensors. What do you mean by message to bang? are you doing a call-and-response between Pd and the Arduino? Are you working with this sketch? http://www.arduino.cc/playground/Code/PIRsense On Thu, Nov 24, 2011 at 11:28 PM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: that kind of works but after it sends it's message to bang something the PIRturns off when the sensor goes off and it sends another value is there a way to ignore that? pp -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Thursday, November 24, 2011 10:43 PM *To:* Pagano, Patrick *Subject:* Re: [PD] arduino question Hi Patrick Are you trying to turn the sample on/off by comparing it to a range? If so, have you tried something like: [ 0.3] | [change] ? cheers dafydd On Thu, Nov 24, 2011 at 10:31 PM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: Hi I am using a PIR sensor with pduino playground and I have the sensor picking up movement. It's my first pd-arduino excursion so forgive the noobie-ness. When I get the out form the PIR sensor it give me a constant value of SOMETHING The entire time. It's output values range from 0.13-0.664/0.665 constantly. I just want to use the sensor to turn off/on a sample but the file is constantly being banged a value. How do I just out put an on/off based upon this constant stream of Data? I tried select bit that does seem to be working. It's a simple parallax PIR sensor and I have been having good luck getting usd to wiring and the breadboard etc. but when I take the analog0 stream/port into pd I do not know how to control that data/ Any help? pp ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] arduino question
That seems to work then i just ignore the 0 bang. thanks! pp From: Dafydd Hughes [dafyd...@gmail.com] Sent: Friday, November 25, 2011 12:22 AM To: Pagano, Patrick Cc: pd-list@iem.at Subject: Re: [PD] arduino question Try this. On Fri, Nov 25, 2011 at 12:19 AM, Pagano, Patrick p...@digitalworlds.ufl.edumailto:p...@digitalworlds.ufl.edu wrote: Yes. r_ANA_0 i assume it sees it as constantly sending something but i do not know how to control it. pp From: Dafydd Hughes [dafyd...@gmail.commailto:dafyd...@gmail.com] Sent: Friday, November 25, 2011 12:18 AM To: Pagano, Patrick Cc: pd-list@iem.atmailto:pd-list@iem.at Subject: Re: [PD] arduino question Oh cool - is this your stuff coming out of ANA_0? On Fri, Nov 25, 2011 at 12:16 AM, Pagano, Patrick p...@digitalworlds.ufl.edumailto:p...@digitalworlds.ufl.edu wrote: it's a number box that is constantly sending 0 or 1 depending on whether the sensor is on or off. the value is a constant stream and i am just unsure how to just get ONE bang when it's turned on and ignore the 0 bang when it turns off. From: Dafydd Hughes [dafyd...@gmail.commailto:dafyd...@gmail.com] Sent: Friday, November 25, 2011 12:12 AM To: Pagano, Patrick Cc: pd-list@iem.atmailto:pd-list@iem.at Subject: Re: [PD] arduino question Hi Patrick Do you mean you only want a bang when the sensor turns on? What do the messages look like coming from the arduino? What is that second value? I hope I'm able to help here! cheers dafydd On Fri, Nov 25, 2011 at 12:04 AM, Pagano, Patrick p...@digitalworlds.ufl.edumailto:p...@digitalworlds.ufl.edu wrote: Kind of. I am still a newbie to this but i have been using pduino_playaround. So are you suggesting removing the second value that is sent by Arduino? What is happening is that pd receives the on from the sensor and keeps baninging until the sensor turns off and then it sends another bang when it turns off so if the sensor turns it on it eventually bangs again and resets to 0 again. whereas i just want it to send bang when it's activated to play a sound and not band when it's done. pp From: Dafydd Hughes [dafyd...@gmail.commailto:dafyd...@gmail.com] Sent: Friday, November 25, 2011 12:00 AM To: Pagano, Patrick Cc: pd-list@iem.atmailto:pd-list@iem.at Subject: Re: [PD] arduino question You know what? I'm not sure. I've never worked with those sensors. What do you mean by message to bang? are you doing a call-and-response between Pd and the Arduino? Are you working with this sketch? http://www.arduino.cc/playground/Code/PIRsense On Thu, Nov 24, 2011 at 11:28 PM, Pagano, Patrick p...@digitalworlds.ufl.edumailto:p...@digitalworlds.ufl.edu wrote: that kind of works but after it sends it's message to bang something the PIRturns off when the sensor goes off and it sends another value is there a way to ignore that? pp From: Dafydd Hughes [dafyd...@gmail.commailto:dafyd...@gmail.com] Sent: Thursday, November 24, 2011 10:43 PM To: Pagano, Patrick Subject: Re: [PD] arduino question Hi Patrick Are you trying to turn the sample on/off by comparing it to a range? If so, have you tried something like: [ 0.3] | [change] ? cheers dafydd On Thu, Nov 24, 2011 at 10:31 PM, Pagano, Patrick p...@digitalworlds.ufl.edumailto:p...@digitalworlds.ufl.edu wrote: Hi I am using a PIR sensor with pduino playground and I have the sensor picking up movement. It's my first pd-arduino excursion so forgive the noobie-ness. When I get the out form the PIR sensor it give me a constant value of SOMETHING The entire time. It's output values range from 0.13-0.664/0.665 constantly. I just want to use the sensor to turn off/on a sample but the file is constantly being banged a value. How do I just out put an on/off based upon this constant stream of Data? I tried select bit that does seem to be working. It's a simple parallax PIR sensor and I have been having good luck getting usd to wiring and the breadboard etc. but when I take the analog0 stream/port into pd I do not know how to control that data/ Any help? pp ___ Pd-list@iem.atmailto:Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] arduino question
Welcome. Glad I could help. On Fri, Nov 25, 2011 at 12:30 AM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: That seems to work then i just ignore the 0 bang. thanks! pp -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Friday, November 25, 2011 12:22 AM *To:* Pagano, Patrick *Cc:* pd-list@iem.at *Subject:* Re: [PD] arduino question Try this. On Fri, Nov 25, 2011 at 12:19 AM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: Yes. r_ANA_0 i assume it sees it as constantly sending something but i do not know how to control it. pp -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Friday, November 25, 2011 12:18 AM *To:* Pagano, Patrick *Cc:* pd-list@iem.at *Subject:* Re: [PD] arduino question Oh cool - is this your stuff coming out of ANA_0? On Fri, Nov 25, 2011 at 12:16 AM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: it's a number box that is constantly sending 0 or 1 depending on whether the sensor is on or off. the value is a constant stream and i am just unsure how to just get ONE bang when it's turned on and ignore the 0 bang when it turns off. -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Friday, November 25, 2011 12:12 AM *To:* Pagano, Patrick *Cc:* pd-list@iem.at *Subject:* Re: [PD] arduino question Hi Patrick Do you mean you only want a bang when the sensor turns on? What do the messages look like coming from the arduino? What is that second value? I hope I'm able to help here! cheers dafydd On Fri, Nov 25, 2011 at 12:04 AM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: Kind of. I am still a newbie to this but i have been using pduino_playaround. So are you suggesting removing the second value that is sent by Arduino? What is happening is that pd receives the on from the sensor and keeps baninging until the sensor turns off and then it sends another bang when it turns off so if the sensor turns it on it eventually bangs again and resets to 0 again. whereas i just want it to send bang when it's activated to play a sound and not band when it's done. pp -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Friday, November 25, 2011 12:00 AM *To:* Pagano, Patrick *Cc:* pd-list@iem.at *Subject:* Re: [PD] arduino question You know what? I'm not sure. I've never worked with those sensors. What do you mean by message to bang? are you doing a call-and-response between Pd and the Arduino? Are you working with this sketch? http://www.arduino.cc/playground/Code/PIRsense On Thu, Nov 24, 2011 at 11:28 PM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: that kind of works but after it sends it's message to bang something the PIRturns off when the sensor goes off and it sends another value is there a way to ignore that? pp -- *From:* Dafydd Hughes [dafyd...@gmail.com] *Sent:* Thursday, November 24, 2011 10:43 PM *To:* Pagano, Patrick *Subject:* Re: [PD] arduino question Hi Patrick Are you trying to turn the sample on/off by comparing it to a range? If so, have you tried something like: [ 0.3] | [change] ? cheers dafydd On Thu, Nov 24, 2011 at 10:31 PM, Pagano, Patrick p...@digitalworlds.ufl.edu wrote: Hi I am using a PIR sensor with pduino playground and I have the sensor picking up movement. It's my first pd-arduino excursion so forgive the noobie-ness. When I get the out form the PIR sensor it give me a constant value of SOMETHING The entire time. It's output values range from 0.13-0.664/0.665 constantly. I just want to use the sensor to turn off/on a sample but the file is constantly being banged a value. How do I just out put an on/off based upon this constant stream of Data? I tried select bit that does seem to be working. It's a simple parallax PIR sensor and I have been having good luck getting usd to wiring and the breadboard etc. but when I take the analog0 stream/port into pd I do not know how to control that data/ Any help? pp ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list