Re: [PD] arduino/comport load hang
On Feb 25, 2014, at 8:46 PM, Martin Peach martin.pe...@sympatico.ca Well without seeing the patch, I can only guess: Does the loadbang hit the baud rate or the open first? Make sure you don't send anything to the arduino for a few seconds or you will invoke the bootloader by mistake. Martin The load bang goes to a message with the device name and baud rate in it. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] arduino/comport load hang
I've had issues getting an arduino to work right with PD on my Raspberry Pi. Basically PD won't start up right with the arduino plugged in from the command line without some finesse. I turn the Pi on, start Jack, then start PD-Extended to open a patch. The patch has a load bang to a comport object with the device name and baud rate. This patch has a the CPU load meter set to print, and the value of several pots set to print through the arduino. The first time the patch will freeze: ccrma@satellite ~ $ pd-extended -nogui -jack -open copy/effectpatch1.pd verbose(5): Using /usr/lib/pd-extended/startup as startup. verbose(4): Loading /usr/lib/pd-extended/startup/0.libdir.pd_linux verbose(3): libdir loader 1.9 verbose(3): compiled on Oct 4 2012 at 15:46:18 verbose(3): compiled against Pd version 0.43.3.extended-20121004 verbose(4): Loading /usr/lib/pd-extended/startup/1.list.pd_linux verbose(4): Loading extra in /usr/lib/pd-extended/startup/extra verbose(3): libdir_loader: added 'extra' to the global objectclass path verbose(14): Loaded libdir 'extra' from '/usr/lib/pd-extended/extra/extra' verbose(4): Loading pdlua in /usr/lib/pd-extended/startup/pdlua verbose(3): pdlua 0.7.1 (GPL) 2012 Martin Peach, based on verbose(3): lua 0.6~svn (GPL) 2008 Claude Heiland-Allen claudiusmaxi...@goto10.orgmailto:claudiusmaxi...@goto10.org verbose(3): pdlua: compiled for pd-0.43 on Oct 4 2012 15:46:20 verbose(4): Loading tclpd in /usr/lib/pd-extended/startup/tclpd verbose(3): tclpd loader v0.3.0 verbose(3): tclpd: trying to load /usr/lib/pd-extended/extra/tclpd/tclpd.tcl... verbose(3): tclpd: loaded /usr/lib/pd-extended/extra/tclpd/tclpd.tcl verbose(4): Loading vanilla in /usr/lib/pd-extended/startup/vanilla verbose(3): libdir_loader: added 'vanilla' to the global objectclass path verbose(14): Loaded libdir 'vanilla' from '/usr/lib/pd-extended/extra/vanilla' @ the zexy external 2.2.5 @ @ (l) forum::für::umläute @ @ iem @ kug @ @ compiled: May 13 2012 @ @ send me a 'help' message @ matchbox: OSC-pattern matching code (c) Matt Wright, CNMAT verbose(3): libdir_loader: added 'cyclone' to the global objectclass path verbose(14): Loaded libdir 'cyclone' from '/usr/lib/pd/extra/cyclone' comport - PD external for unix/windows LGPL 1998-2006, Winfried Ritsch and others (see LICENSE.txt) Institute for Electronic Music - Graz expr, expr~, fexpr~ version 0.4 under GNU General Public License get_baud_ratebits: 9600 set_baudrate baudbits: 13 ^CPd: signal 2 Until I close it with Control-C. This takes about 60 seconds to close the program. Then I fire it up and the whole thing loads and begins printing the CPU load as I want, but not the pots. At this point I can keep closing and restarting PD and get the same result. Now, if I unplug the arduino and reconnect it, and start PD everything fires right up! Any ideas why it won't load up from the start? I have tried delaying the comport open for a second, with no luck. ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [PD] Arduino/Raspberry comport issue
If I didn't mention I'm actually using a Teensy 3.0 not an arduino. Read on pjrc.comhttp://pjrc.com that the teensy runs at full USB speed all the time unlike arduino. So that seems like the comport speed should be irrelevant? In any case yesterday I turned the rip and teensy on and pd was reading from it immediately every time I opened a patch. Maybe it worked itself out? I'm using ccrma satellite which is a raspbian distro. I'll check the user permissions also On Nov 12, 2013, at 2:38 AM, kubriel kubr...@servus.atmailto:kubr...@servus.at wrote: baud rate _should_ be the same in your arduino code and in your comport object, otherwise you get messed up characters. i dont have rpi here, but i didnt noticed any chenges between running comport on rpi, or standard pc. when you send [devices( you usually get list of connected serial devices - arduinos with usb2serial and com ports if you have. also check, ig your user is in uucp group, i think it is necessary, and maybe also dialout group can be important. probably it depense if you are using debian fedora or arch on this rpi kub On 11.11.2013 18:13, Alexandros Drymonitis wrote: Are you sure the baud rate you set to [comport] is the same as the code you load on your Arduino? That could be a problem.. If you send the [devices( message to [comport] what do you get in the console? On Mon, Nov 11, 2013 at 11:19 AM, kubriel kubr...@servus.atmailto:kubr...@servus.at wrote: It won?t receive data. Hi! i was using RPi plenty of times headless without any problems with comport in pd, but usually running armarch linux. but i was not using device name, but device nr, like [comport 0 9600] for uno, or [comport 4 9600] for duemilanove. kub -- http://kubriel.servus.at ___ Pd-list@iem.atmailto:Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list -- http://kubriel.servus.at ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
[PD] Arduino/Raspberry comport issue
I’m using a Teensy to get data from Pots and switches into PD on a RPi. The teensy sketch is set to open serial at 9600 baud. In PD I have [comport devicename 9600]. It won’t receive data. When I change the object to [comport devicename 115200] it immediately opens and starts receiving data. I’m specifying the device name since it seems to be switching between port 1 and 0 for unknown reasons upon power cycling or unplugging, etc. So then if I save the patch with [comport device name 115200] and reopen it, it won’t receive data. If I change the object to [comport device name 9600] it immediately opens the port and starts receiving. So it doesn’t seem to matter what the absolute value of the baud rate is, it just wants to be something other than what I specify initially? Ultimately I want to run headless without a gui, and just plug the RPi in and have it work so needing to change the object each time will not fly. Any ideas on what is happening here? Mike ___ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list