Re: [PD] Comport issue: two digits problem
[list-compare] in the list-abs. It returns 0 or 1. ++ Jack Le vendredi 11 décembre 2009 à 01:09 +0100, Luca Caridà a écrit : > Thank you very much martin, > > > Adding a "print" to [comport] I see the list of 12 ascii values. > > > Having a single [0...255] number from Arduino would be easier and > probably the best way to go. But I also wish to understand if pure > data can make the job. > > > For that I used a [list prepend] [list append] to obtain a list of my > two-digits numbers. > Putting a [print] after [list append] allows me to see the inline > list: > print: 48 49 48 52 52 53 69 56 66 56 > > > And that leads me to a more general question: could I compare a list > to another list and obtain a BANG as they match?. At first I was > thinking of using [select], but I don't know if it can manage lists > and how. > > > > > > > > > > Il giorno 10/dic/09, alle ore 19:36, > ha scritto: > > > lineacurva wrote: > > > > > Hi guys, > > > > > > I'm working on my first RFID project, involving Arduino and Pure > > > Data. I use Innovation Id-20 reader and Arduino 2009. I'm stuck in > > a > > > problem with "comport". > > > > > > As I put a transponder near the reader, in Arduino serial monitor > > I > > > can see a number like: 495211712056 > > > > > > But in the little patch I attach here, comport reads: 53 > > > > > > This is a problem since more than one transponder give me a "53" > > > feedback (but a different 12 digits number in Arduino monitor). > > > > > > > 53 is the ASCII value of the character '5'. Probably if you add a > > [print] to the [comport] output you would get a list of 12 ASCII > > values for each sample. > > > > In Pd you need to accumulate the list of incoming ASCII codes, > > subtract 48 (ASCII '0') from each, and route them accordingly. A > > 12-digit number won't display correctly as a float. Probably it's > > easier in Arduino to make your numbers ints on [0..255] and send > > them as BYTE. Then you get one number per sample and don't need to > > handle lists. > > > > Martin > > > > > ___ > 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] Comport issue: two digits problem
Thank you very much martin, Adding a "print" to [comport] I see the list of 12 ascii values. Having a single [0...255] number from Arduino would be easier and probably the best way to go. But I also wish to understand if pure data can make the job. For that I used a [list prepend] [list append] to obtain a list of my two-digits numbers. Putting a [print] after [list append] allows me to see the inline list: print: 48 49 48 52 52 53 69 56 66 56 And that leads me to a more general question: could I compare a list to another list and obtain a BANG as they match?. At first I was thinking of using [select], but I don't know if it can manage lists and how. Il giorno 10/dic/09, alle ore 19:36, ha scritto: lineacurva wrote: > Hi guys, > > I'm working on my first RFID project, involving Arduino and Pure > Data. I use Innovation Id-20 reader and Arduino 2009. I'm stuck in a > problem with "comport". > > As I put a transponder near the reader, in Arduino serial monitor I > can see a number like: 495211712056 > > But in the little patch I attach here, comport reads: 53 > > This is a problem since more than one transponder give me a "53" > feedback (but a different 12 digits number in Arduino monitor). > 53 is the ASCII value of the character '5'. Probably if you add a [print] to the [comport] output you would get a list of 12 ASCII values for each sample. In Pd you need to accumulate the list of incoming ASCII codes, subtract 48 (ASCII '0') from each, and route them accordingly. A 12- digit number won't display correctly as a float. Probably it's easier in Arduino to make your numbers ints on [0..255] and send them as BYTE. Then you get one number per sample and don't need to handle lists. Martin ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] Comport issue: two digits problem
lineacurva wrote: > Hi guys, > > I'm working on my first RFID project, involving Arduino and Pure > Data. I use Innovation Id-20 reader and Arduino 2009. I'm stuck in a > problem with "comport". > > As I put a transponder near the reader, in Arduino serial monitor I > can see a number like: 495211712056 > > But in the little patch I attach here, comport reads: 53 > > This is a problem since more than one transponder give me a "53" > feedback (but a different 12 digits number in Arduino monitor). > 53 is the ASCII value of the character '5'. Probably if you add a [print] to the [comport] output you would get a list of 12 ASCII values for each sample. In Pd you need to accumulate the list of incoming ASCII codes, subtract 48 (ASCII '0') from each, and route them accordingly. A 12-digit number won't display correctly as a float. Probably it's easier in Arduino to make your numbers ints on [0..255] and send them as BYTE. Then you get one number per sample and don't need to handle lists. Martin ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
[PD] Comport issue: two digits problem
Hi guys, I'm working on my first RFID project, involving Arduino and Pure Data. I use Innovation Id-20 reader and Arduino 2009. I'm stuck in a problem with "comport". As I put a transponder near the reader, in Arduino serial monitor I can see a number like: 495211712056 But in the little patch I attach here, comport reads: 53 This is a problem since more than one transponder give me a "53" feedback (but a different 12 digits number in Arduino monitor). Anyone can help me? Thank you in advance, Luca comport_arduino.pd Description: Binary data ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
RE: [PD] comport issue (solved)
Thank you Martin, It works. What is funny (stupid) is that I compiled the new version last week and sent it to Charles Henry [EMAIL PROTECTED] In addition, because I want to control a serial mouse I must first power it by enabling RTS and also enable the RTS/CTS handshaking in order to make it work. Renaud -Original Message- From: Martin Peach [mailto:[EMAIL PROTECTED] Sent: 21 November 2006 15:17 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; pd-list@iem.at Subject: Re: [PD] comport issue [EMAIL PROTECTED] wrote: > Hey, > > > I got something similar last night. > I tried to interface a serial mouse to one of my com ports. > The idea behind this is to get more handy controls at no cost. > I checked the proto of the mouse I found back in stuff with a terminal and a hex editor. > It mached the description of a Microsoft 2 button mouse (3 data words > of 7 bits 1200 bps no parity one stop no handshake) So far so good But > I didn't recieved anything in comport (after turning off the teminal > to release the com) I also tried something less exotic (another PC > connected wit a null modem cable to the port - Both running 9600-8-N-1 no handshake) But I wasn't able to get anything. > I noticed that open 0 opens COM1, open 1 opens com 2... > > If so you have an old version of comport. The latest version will probably work better. Martin DISCLAIMER http://www.belgacom.be/maildisclaimer ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] comport issue
You also have to have both the Arduino and Pd set to the exact same bitrate, which has to be one of those values that Matju listed. .hc On Nov 18, 2006, at 1:57 PM, [EMAIL PROTECTED] wrote: I tried all those speeds too. No luck very odd thanks On 18 Nov 2006, at 17:59, Mathieu Bouchard wrote: On Sat, 18 Nov 2006, [EMAIL PROTECTED] wrote: I have an arduino communicating with PD via comport. If I set the baud rate higher than about 22000 comport throws out rubbish. I don't know anything about Arduino, but serial ports are usually made to support exactly those values: 19200 38400 = 2*19200 57600 = 3*19200 115200 = 6*19200 230400 = 12*19200 and I don't know whether they support any other speeds, but I suspect that any other speeds would be multiples of 19200. _ _ __ ___ _ _ _ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list I spent 33 years and four months in active military service and during that period I spent most of my time as a high class muscle man for Big Business, for Wall Street and the bankers. - General Smedley Butler ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] comport issue
I tried all those speeds too. No luck very odd thanks On 18 Nov 2006, at 17:59, Mathieu Bouchard wrote: On Sat, 18 Nov 2006, [EMAIL PROTECTED] wrote: I have an arduino communicating with PD via comport. If I set the baud rate higher than about 22000 comport throws out rubbish. I don't know anything about Arduino, but serial ports are usually made to support exactly those values: 19200 38400 = 2*19200 57600 = 3*19200 115200 = 6*19200 230400 = 12*19200 and I don't know whether they support any other speeds, but I suspect that any other speeds would be multiples of 19200. _ _ __ ___ _ _ _ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] comport issue
On Sat, 18 Nov 2006, [EMAIL PROTECTED] wrote: I have an arduino communicating with PD via comport. If I set the baud rate higher than about 22000 comport throws out rubbish. I don't know anything about Arduino, but serial ports are usually made to support exactly those values: 19200 38400 = 2*19200 57600 = 3*19200 115200 = 6*19200 230400 = 12*19200 and I don't know whether they support any other speeds, but I suspect that any other speeds would be multiples of 19200. _ _ __ ___ _ _ _ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
[PD] comport issue
A bit of a strange one this. Hope someone can help. I have an arduino communicating with PD via comport. If I set the baud rate higher than about 22000 comport throws out rubbish. The arduino is just counting from 1 to 10 with a 10ms gap between each value. If I use zterm to look at the data its all fine and as expected. So I was seeing this as a limitation of comport not supporting higher baudrate but I have also used comport to communicate with a bluetooth device set at 115200 and no problems at all. Any ideas? That zterm shows the correct info rules out a problem with the arduino. That comport talks happily to bluetooth device I took to rule out the iea that it cant support higher baud. Im on os x 10.3.9 Thanks Nick ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list