Hey folks
I feel like an idiot. I'm trying to get a rotary encoder to send data to Pd - I have the arduino end working fine, but I'm getting a bunch of ascii numbers coming out of [comport]. Can somebody help this poor old tired brain change them to floats?
cheers dafydd
Hi, Maybe adjust de baud rate,,,,
Best regards
José
2010/10/25 Dafydd Hughes dafydd61@gmail.com
Hey folks
I feel like an idiot. I'm trying to get a rotary encoder to send data to Pd
- I have the arduino end working fine, but I'm getting a bunch of ascii
numbers coming out of [comport]. Can somebody help this poor old tired brain change them to floats?
cheers dafydd _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
The easy way is to get arduino to send bytes, like: Serial.print(value, BYTE); This is fine if the value is between 0 and 255, otherwise you need to send: Serial.println(value); , catch the ASCII linefeed (CR = 10 or LF = 13) and accumulate all the digits before that, subtract ASCII zero ('0' = 48) from each digit, then multiply the digits by powers of 10 and add them together.
Martin
On 2010-10-25 18:08, Dafydd Hughes wrote:
Hey folks
I feel like an idiot. I'm trying to get a rotary encoder to send data to Pd - I have the arduino end working fine, but I'm getting a bunch of ascii numbers coming out of [comport]. Can somebody help this poor old tired brain change them to floats?
cheers dafydd _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Mon, 25 Oct 2010, Dafydd Hughes wrote:
I feel like an idiot. I'm trying to get a rotary encoder to send data to Pd - I have the arduino end working fine, but I'm getting a bunch of ascii numbers coming out of [comport]. Can somebody help this poor old tired brain change them to floats?
see this help file : http://gridflow.ca/help/ascii_to_f-help.html
get GridFlow at http://gridflow.ca/
Made in Canada !
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC
Thanks everybody for the advice. I think, as this needs to be done Wednesday, it's time to lose the rotary encoders in favour of pots and use pduino (thank you pduino!!) and analog ins.
It's so rare for me that the analog version is simpler and cleaner than the digital!
cheers dafydd
On 2010-10-25, at 8:26 PM, Mathieu Bouchard wrote:
On Mon, 25 Oct 2010, Dafydd Hughes wrote:
I feel like an idiot. I'm trying to get a rotary encoder to send data to Pd - I have the arduino end working fine, but I'm getting a bunch of ascii numbers coming out of [comport]. Can somebody help this poor old tired brain change them to floats?
see this help file : http://gridflow.ca/help/ascii_to_f-help.html
get GridFlow at http://gridflow.ca/
Made in Canada !
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC