I can't send the number 13 from the Arduino to Pd using Arduino's Serial.write() function. Instead I'm receiving a 10. Does this have anything to do with the fact that ASCII 10 is a new line feed and ASCII 13 is the carriage return? Maybe [comport] is interpreting both values as the new line feed, just a thought.
A work around this is to use Serial.print((char)13); in the Arduino code. This did work with an Arduino UNO and my laptop, running Debian Jessie XFCE, but it failed with a Teensy 3.6 and an Ordoid-U3, running an Ubuntu 14.04 LTS image. Both systems run Pd-0.47-1 with [comport] installed via apt-get.
On Wed, Mar 29, 2017 at 5:42 AM, Alexandros Drymonitis adrcki@gmail.com wrote:
I can't send the number 13 from the Arduino to Pd using Arduino's Serial.write() function. Instead I'm receiving a 10. Does this have anything to do with the fact that ASCII 10 is a new line feed and ASCII 13 is the carriage return? Maybe [comport] is interpreting both values as the new line feed, just a thought.
It works fine for me. Pd 0.47.1, Arduino 1.8.1 on Windows7. In Arduino:
Serial.write(13);
In Pd
[comport] | {print]
prints 13 to the console.
Serial.println("0") gives 48 13 10 in Pd. [comport] doesn't interpret anything it receives.
Martin
On Wed, Mar 29, 2017 at 11:07 AM, Martin Peach chakekatzil@gmail.com wrote:
On Wed, Mar 29, 2017 at 5:42 AM, Alexandros Drymonitis adrcki@gmail.com wrote:
I can't send the number 13 from the Arduino to Pd using Arduino's Serial.write() function. Instead I'm receiving a 10. Does this have anything to do with the fact that ASCII 10 is a new line feed and ASCII 13 is the carriage return? Maybe [comport] is interpreting both values as the new line feed, just a thought.
It works fine for me. Pd 0.47.1, Arduino 1.8.1 on Windows7.
It also works here on linux with [comport] installed via deken.
Martin
I encountered an issue that might be related.
I don't have an Arduino board at hand right now, but I try to reconstruct from memory. The [arduino] abstraction from pduino 0.6 allows to query the pin state of each pin. When testing this, I noticed I cannot query the state of pin 13. I send 'pinState 13' and I get the state of pin 10, in other words I receive a message like:
'pinState 10 DIGITAL_INPUT 0'
I wondered about it, but didn't have the time to further investigate.
This is with:
Roman
On Mit, 2017-03-29 at 12:42 +0300, Alexandros Drymonitis wrote:
I can't send the number 13 from the Arduino to Pd using Arduino's Serial.write() function. Instead I'm receiving a 10. Does this have anything to do with the fact that ASCII 10 is a new line feed and ASCII 13 is the carriage return? Maybe [comport] is interpreting both values as the new line feed, just a thought.
A work around this is to use Serial.print((char)13); in the Arduino code. This did work with an Arduino UNO and my laptop, running Debian Jessie XFCE, but it failed with a Teensy 3.6 and an Ordoid-U3, running an Ubuntu 14.04 LTS image. Both systems run Pd-0.47-1 with [comport] installed via apt-get. _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/lis tinfo/pd-list
On 03/29/2017 12:42 PM, Alexandros Drymonitis wrote:
I can't send the number 13 from the Arduino to Pd using Arduino's Serial.write() function. Instead I'm receiving a 10. Does this have anything to do with the fact that ASCII 10 is a new line feed and ASCII 13 is the carriage return? Maybe [comport] is interpreting both values as the new line feed, just a thought.
A work around this is to use Serial.print((char)13); in the Arduino code. This did work with an Arduino UNO and my laptop, running Debian Jessie XFCE, but it failed with a Teensy 3.6 and an Ordoid-U3, running an Ubuntu 14.04 LTS image. Both systems run Pd-0.47-1 with [comport] installed via apt-get.
Apparently this issue seems to have been solved with the latest Arduino IDE (1.8.3) and the latest [comport] found in deken. I guess it was an Arduino issue since [comport] doesn't interpret anything. Anyway, I wanted to let the list know, in case anyone is interested in this. Now [comport] prints 13 with both Serial.write(13) and Serial.print((char)13).
On Mon, 2017-08-21 at 11:04 +0300, alex wrote:
On 03/29/2017 12:42 PM, Alexandros Drymonitis wrote:
I can't send the number 13 from the Arduino to Pd using Arduino's Serial.write() function. Instead I'm receiving a 10. Does this have anything to do with the fact that ASCII 10 is a new line feed and ASCII 13 is the carriage return? Maybe [comport] is interpreting both values as the new line feed, just a thought.
A work around this is to use Serial.print((char)13); in the Arduino code. This did work with an Arduino UNO and my laptop, running Debian Jessie XFCE, but it failed with a Teensy 3.6 and an Ordoid-U3, running an Ubuntu 14.04 LTS image. Both systems run Pd-0.47-1 with [comport] installed via apt-get.
Apparently this issue seems to have been solved with the latest Arduino IDE (1.8.3) and the latest [comport] found in deken. I guess it was an Arduino issue since [comport] doesn't interpret anything. Anyway, I wanted to let the list know, in case anyone is interested in this. Now [comport] prints 13 with both Serial.write(13) and Serial.print((char)13).
OK, cool. Thanks for the report.
Roman