[PD] Arduino, Pd and ultrasonics: HELP needed for degree project!

Chris Jack itsmrjack at gmail.com
Tue Sep 28 15:11:42 CEST 2010


Collin, it worked! Great stuff, thank you.

On 28 September 2010 06:43, Collin <coldham at mac.com> wrote:

> I've done this a few times adding a char and a space before the value and
> sorting it out with a [route]
> The char goes in quotes, and don't forget the space!
>
> On Sep 27, 2010, at 10:59 AM, pd-list-request at iem.at wrote:
>
>   // SRF02 READING //
>
>
>   sendCommand(sensorAddress, readInches);
>
>
>   delay(70);
>
>
>   setRegister(sensorAddress, resultRegister);
>
>
>   int sensorReading = readData(sensorAddress, 2);
>
>
> Serial.print("s ");
>
>  Serial.println(sensorReading);
>
>
>
>   delay (200);
>
>
>
>
>   // GPD12 READING //
>
>
>   sensorValue = analogRead(sensorPin);
>
>
>   int range = (6787 / sensorValue);
>
>
> Serial.print("r ");
>
>   Serial.println(range);
>
>
>
> then in the patch:
>
> [comport 8 9600]
> |
> [ascii2pd CR]
> |
> [route list]
> |
> [route s r]
>
>
> Collin
>
> collinoldham.com
>
>
>
>


-- 
Mr Jack

Discus Jockey
Audio Tweeker
Musical Protagonist

itsmrjack at gmail.com
http://soundcloud.com/mrjack
http://www.myspace.com/itsmrjack

http://earshaveeyes.blogspot.com
http://campari0safari.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20100928/1405378f/attachment-0001.htm>


More information about the Pd-list mailing list