Ok i'll try to print the input to see what it looks like. <br><br>Since yesterday i've been experimenting with a custom sketch for the board and the [comport] object in Pd. I'm beginning to wonder whether it wouldn't be easier to just write a simple program for the board and a simple patch to get sensor data from comport. I just need 8 or 10 digital inputs and 4 analog inputs, and no output/servo/etc. <br>
<br>Right now i'm stuck with a single input working in Pd, since i don't know how to write a list of values in Serial.write that i could unpack in Pd. <br><br>Pierre<br><br><div class="gmail_quote">2011/7/7 Ingo <span dir="ltr"><<a href="mailto:ingo@miamiwave.com">ingo@miamiwave.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Sorry Pierre! I’m surprised that it didn’t work. It's surely working here.<br>
But then again you might have the arduino set up differently than I do and<br>
something else might interfere with the (replaced) numbers.<br>
<br>
Try to check out how the numbers change before they go into the<br>
[mapping/debytemask] by sending them to [print]. They shouldn't produce<br>
lists that start with 0 or 1 or 2 or 3 as far as I recall.<br>
<div class="im"><br>
Ingo<br>
<br>
<br>
________________________________________<br>
Von: Pierre Massat [mailto:<a href="mailto:pimassat@gmail.com">pimassat@gmail.com</a>]<br>
</div>Gesendet: Mittwoch, 6. Juli 2011 20:48<br>
<div><div></div><div class="h5">An: Ingo<br>
Cc: Hans-Christoph Steiner; <a href="mailto:pd-list@iem.at">pd-list@iem.at</a><br>
Betreff: Re: [PD] Arduino (is drivin me mad<br>
<br>
Ok, i replaced mapping/debytemask and the rest as you suggested, but it<br>
didn't work. Then i replaced 0 and 1 in the debyte object by 8 and 9, to no<br>
avail.<br>
<br>
I'm afraid I can't find a fix alone, as i have no idea what the incoming<br>
data from the board looks like.<br>
<br>
Anyway, thanks for helping me.<br>
<br>
Pierre<br>
2011/7/6 Ingo <<a href="mailto:ingo@miamiwave.com">ingo@miamiwave.com</a>><br>
It should be here:<br>
<br>
[arduino] / [pd convert_to_symbolic_commands] / [pd digital messages] /<br>
[mapping/debytemask]<br>
<br>
I was using the Pduino-0.5beta8 arduino-test.pd<br>
<br>
<br>
Ingo<br>
<br>
________________________________________<br>
Von: Pierre Massat [mailto:<a href="mailto:pimassat@gmail.com">pimassat@gmail.com</a>]<br>
Gesendet: Mittwoch, 6. Juli 2011 19:01<br>
An: Ingo<br>
Cc: Hans-Christoph Steiner; <a href="mailto:pd-list@iem.at">pd-list@iem.at</a><br>
Betreff: Re: [PD] Arduino (is drivin me mad<br>
<br>
Thank you Ingo. Unfortunately I can't even locate the mapping/debytemask<br>
object to be replaced...<br>
<br>
Pierre<br>
2011/7/6 Ingo <<a href="mailto:ingo@miamiwave.com">ingo@miamiwave.com</a>><br>
I assume that the error might be somehow caused by the fact that the digital<br>
pins are not offset by two as it should be the case since pin 0 & 1 ought to<br>
be handled separately from the rest of the digital ins.<br>
<br>
BTW the debyte patch should replace [mapping/debytemask] plus the following<br>
message boxes and the [unpack float float] object.<br>
<br>
Ingo<br>
<br>
<br>
> It looks like I changed pin 8 and 9 to be output as pin 0 and 1 for some<br>
> reason. You should change the two message boxes at the left from<br>
><br>
> [0 $1( [1 $1( to<br>
><br>
> [8 $1( [9 $1(<br>
><br>
> to get the correct pin numbering.<br>
><br>
> Ingo<br>
><br>
><br>
> > -----Ursprüngliche Nachricht-----<br>
> > Von: Ingo [mailto:<a href="mailto:ingo@miamiwave.com">ingo@miamiwave.com</a>]<br>
> > Gesendet: Mittwoch, 6. Juli 2011 05:46<br>
> > An: 'Pierre Massat'; 'Hans-Christoph Steiner'<br>
> > Cc: 'Ingo'; <a href="mailto:pd-list@iem.at">pd-list@iem.at</a><br>
> > Betreff: AW: [PD] Arduino (is drivin me mad<br>
> ><br>
> > > Please tell me that all hope is not lost ...<br>
> ><br>
> ><br>
> > I looked it up and I found my fix. The errors are getting obvious here:<br>
> ><br>
> > Arduino / convert_to_symbolic_commands / digital messages / debyte<br>
> ><br>
> > If you replace “debyte” with this patch “pd debyte” it should work<br>
> > although<br>
> > I am not sure if pins higher than 9 were taken care of.<br>
> > If the bytes higher than 9 are still causing problems you might have to<br>
> > set<br>
> > the first moses to a higher number like 8 or so.<br>
> > I am not sure if it can interfere with anything else and I am also not<br>
> > sure<br>
> > if it works with boards other than Diecimila and Duemilanove.<br>
> ><br>
> > The problem is not “debyte” – it’s the numbers coming in that just get<br>
> > fixed<br>
> > with this workaround!<br>
> ><br>
> > Ingo<br>
> ><br>
> ><br>
> > #N canvas 11 14 450 290 10;<br>
> > #N canvas 252 114 541 378 debyte 0;<br>
> > #X obj 32 161 & 1;<br>
> > #X obj 82 161 & 2;<br>
> > #X obj 162 345 outlet;<br>
> > #X obj 32 181 change;<br>
> > #X obj 82 181 change;<br>
> > #X obj 32 20 inlet;<br>
> > #X obj 264 181 change;<br>
> > #X obj 315 181 change;<br>
> > #X obj 366 181 change;<br>
> > #X obj 417 181 change;<br>
> > #X obj 162 181 change;<br>
> > #X obj 213 181 change;<br>
> > #X msg 32 221 0 \$1;<br>
> > #X msg 82 221 1 \$1;<br>
> > #X msg 162 221 2 \$1;<br>
> > #X msg 213 221 3 \$1;<br>
> > #X msg 264 221 4 \$1;<br>
> > #X msg 315 221 5 \$1;<br>
> > #X msg 366 221 6 \$1;<br>
> > #X msg 417 221 7 \$1;<br>
> > #X obj 162 308 unpack;<br>
> > #X obj 205 345 outlet;<br>
> > #X obj 162 161 & 4;<br>
> > #X obj 213 160 & 8;<br>
> > #X obj 264 161 & 16;<br>
> > #X obj 32 201 == 1;<br>
> > #X obj 82 201 == 2;<br>
> > #X obj 162 201 == 4;<br>
> > #X obj 213 201 == 8;<br>
> > #X obj 264 201 == 16;<br>
> > #X obj 315 201 == 32;<br>
> > #X obj 315 160 & 32;<br>
> > #X obj 366 201 == 64;<br>
> > #X obj 417 201 == 128;<br>
> > #X obj 366 161 & 64;<br>
> > #X obj 417 160 & 128;<br>
> > #X obj 32 41 moses 4;<br>
> > #X obj 162 104 trigger float float float float float float;<br>
> > #X obj 71 61 moses 253;<br>
> > #X connect 0 0 3 0;<br>
> > #X connect 1 0 4 0;<br>
> > #X connect 3 0 25 0;<br>
> > #X connect 4 0 26 0;<br>
> > #X connect 5 0 36 0;<br>
> > #X connect 6 0 29 0;<br>
> > #X connect 7 0 30 0;<br>
> > #X connect 8 0 32 0;<br>
> > #X connect 9 0 33 0;<br>
> > #X connect 10 0 27 0;<br>
> > #X connect 11 0 28 0;<br>
> > #X connect 12 0 20 0;<br>
> > #X connect 13 0 20 0;<br>
> > #X connect 14 0 20 0;<br>
> > #X connect 15 0 20 0;<br>
> > #X connect 16 0 20 0;<br>
> > #X connect 17 0 20 0;<br>
> > #X connect 18 0 20 0;<br>
> > #X connect 19 0 20 0;<br>
> > #X connect 20 0 2 0;<br>
> > #X connect 20 1 21 0;<br>
> > #X connect 22 0 10 0;<br>
> > #X connect 23 0 11 0;<br>
> > #X connect 24 0 6 0;<br>
> > #X connect 25 0 12 0;<br>
> > #X connect 26 0 13 0;<br>
> > #X connect 27 0 14 0;<br>
> > #X connect 28 0 15 0;<br>
> > #X connect 29 0 16 0;<br>
> > #X connect 30 0 17 0;<br>
> > #X connect 31 0 7 0;<br>
> > #X connect 32 0 18 0;<br>
> > #X connect 33 0 19 0;<br>
> > #X connect 34 0 8 0;<br>
> > #X connect 35 0 9 0;<br>
> > #X connect 36 0 0 0;<br>
> > #X connect 36 0 1 0;<br>
> > #X connect 36 1 38 0;<br>
> > #X connect 37 0 22 0;<br>
> > #X connect 37 1 23 0;<br>
> > #X connect 37 2 24 0;<br>
> > #X connect 37 3 31 0;<br>
> > #X connect 37 4 34 0;<br>
> > #X connect 37 5 35 0;<br>
> > #X connect 38 0 37 0;<br>
> > #X connect 38 1 0 0;<br>
> > #X connect 38 1 1 0;<br>
> > #X restore 168 99 pd debyte;<br>
> ><br>
> ><br>
> ><br>
> > ________________________________________<br>
> > Von: Pierre Massat [mailto:<a href="mailto:pimassat@gmail.com">pimassat@gmail.com</a>]<br>
> > Gesendet: Dienstag, 5. Juli 2011 22:23<br>
> > An: Hans-Christoph Steiner<br>
> > Cc: Ingo; <a href="mailto:pd-list@iem.at">pd-list@iem.at</a><br>
> > Betreff: Re: [PD] Arduino (is drivin me mad<br>
> ><br>
> > You tried with your "StandardFirmata", to no avail.<br>
> ><br>
> > Please tell me that all hope is not lost, doc...<br>
> ><br>
> > :Pierre<br>
> > 2011/7/5 Pierre Massat <<a href="mailto:pimassat@gmail.com">pimassat@gmail.com</a>><br>
> > Should I try to upload a older firmata?<br>
> ><br>
> > :Pierre<br>
> ><br>
> > 2011/7/5 Hans-Christoph Steiner <<a href="mailto:hans@at.or.at">hans@at.or.at</a>><br>
> ><br>
> > The Uno board was troublesome back when I first tried it, but that was a<br>
> > while ago. I didn't make that StandardFirmata_2_2_for_Uno_0_3 firmware,<br>
> > so<br>
> > I don't know what changes it has. Is anyone having these problems on<br>
> > boards<br>
> > older than an Uno?<br>
> ><br>
> > .hc<br>
> ><br>
> > On Jul 5, 2011, at 3:32 PM, Pierre Massat wrote:<br>
> ><br>
> ><br>
> > It makes no difference at all.<br>
> ><br>
> > Here's what happens :<br>
> > Inputs 2 through 7 work fine.<br>
> > Inputs 8 and 9 work fine.<br>
> ><br>
> > But if i use any of the inputs within the 2-7 group, and then use any<br>
> > input<br>
> > of the second group (8 and 9), i have to trigger the later twice before<br>
> i<br>
> > can see something is happening.<br>
> ><br>
> > It goes like this :<br>
> > (in group 2 to 7)<br>
> > First guy : "Pushed button 3."<br>
> > Second guy (Pd) : "Ok, pushed button 3."<br>
> > First guy : "Pushed button 7."<br>
> > Second guy : "K, you pushed button 7."<br>
> > First guy : "Pushed button 8."<br>
> > Second guy : "Come again?"<br>
> > First guy : "PUSHED BUTTON 8!"<br>
> > Second guy : "Oh, yeah, button 8..."<br>
> > First guy ; "Pushed button 3."<br>
> > Second guy : "I'm sorry, what button?"<br>
> > First guy : "BUTTON 3!!"<br>
> > Second guy : "Yep, button 3.<br>
> ><br>
> > I hope it is clear now what the problem is.<br>
> ><br>
> > Pierre<br>
> > 2011/7/5 Pierre Massat <<a href="mailto:pimassat@gmail.com">pimassat@gmail.com</a>><br>
> > Ok, I checked in Windows XP, with a custom sketch, and all of my inputs<br>
> > work<br>
> > flawlessly.<br>
> > (The IDE seem to work much better in Windows than in Linux btw).<br>
> ><br>
> > So the problem has to be somewhere between firmata and pduino.<br>
> ><br>
> > I will try with the latest pduino...<br>
> ><br>
> > Thanks for your help!<br>
> ><br>
> > Pierre<br>
> ><br>
> > 2011/7/5 Hans-Christoph Steiner <<a href="mailto:hans@at.or.at">hans@at.or.at</a>><br>
> ><br>
> > It would good to nail down the source of this and fix it. Which version<br>
> > of<br>
> > Firmata are you using? Which firmware? Also, there was a bug like that<br>
> a<br>
> > while back that was fixed, so make sure you have the latest Pd patch<br>
> too:<br>
> ><br>
> > <a href="http://at.or.at/hans/pd/objects.html#pduino" target="_blank">http://at.or.at/hans/pd/objects.html#pduino</a><br>
> ><br>
> > .hc<br>
> ><br>
> > On Jul 5, 2011, at 2:49 PM, Ingo wrote:<br>
> ><br>
> > I fixed it by replacing the mapping object by a custom patch which deals<br>
> > with the first two switches seperately.<br>
> > I’ll look it up tomorrow and send you my fix.<br>
> ><br>
> > >And where does the problem lie? In the board, firmata, or pduino?<br>
> ><br>
> > It suppose fermata since the wrong numbers arrive at pduino.<br>
> ><br>
> > Ingo<br>
> ><br>
> ><br>
> > ________________________________________<br>
> > Von: Pierre Massat [mailto:<a href="mailto:pimassat@gmail.com">pimassat@gmail.com</a>]<br>
> > Gesendet: Dienstag, 5. Juli 2011 20:41<br>
> > An: Ingo Scherzinger<br>
> > Cc: Ingo Scherzinger<br>
> > Betreff: Re: [PD] Arduino (is drivin me mad<br>
> ><br>
> > Can we fix that??<br>
> ><br>
> > Pierre<br>
> > 2011/7/5 Ingo Scherzinger <<a href="mailto:ingo@fixitinthemix.de">ingo@fixitinthemix.de</a>><br>
> > I happens when switching from the first two switches to the others<br>
> within<br>
> > a<br>
> > 8-bit block. Since the block has the wrong header it will ignore the<br>
> "on"<br>
> > message and send the first "off". So you have to press the button twice.<br>
> > Once pressed it works until you press another button within that block<br>
> and<br>
> > return to the first one.<br>
> ><br>
> > Ingo<br>
> ><br>
> > ________________________________________<br>
> > Von: Pierre Massat [mailto:<a href="mailto:pimassat@gmail.com">pimassat@gmail.com</a>]<br>
> > Gesendet: Dienstag, 5. Juli 2011 19:56<br>
> > An: Ingo Scherzinger<br>
> > Betreff: Re: [PD] Arduino (is drivin me mad<br>
> ><br>
> > Glad to know i'm not the only one with this problem! Sorry for starting<br>
> a<br>
> > new thread.<br>
> > I have problems with inputs 8 and 9, or 9 and 10 (the first two on the<br>
> > second digital input socket).<br>
> ><br>
> > Pierre<br>
> > 2011/7/5 Ingo Scherzinger <<a href="mailto:ingo@miamiwave.com">ingo@miamiwave.com</a>><br>
> > This is the same problem I had described several times before. There is<br>
> an<br>
> > error in the 8-bit block where the digital ins 2+3 are coming in. It can<br>
> > be<br>
> > traced somewhere in the mapping section. I'll try to finally look it up<br>
> > tomorrow.<br>
> ><br>
> > Ingo<br>
> ><br>
> ><br>
> ><br>
> > ________________________________________<br>
> > Von: <a href="mailto:pd-list-bounces@iem.at">pd-list-bounces@iem.at</a> [mailto:<a href="mailto:pd-list-bounces@iem.at">pd-list-bounces@iem.at</a>] Im Auftrag<br>
> von<br>
> > Pierre Massat<br>
> > Gesendet: Dienstag, 5. Juli 2011 19:36<br>
> > An: pd-list<br>
> > Betreff: [PD] Arduino (is drivin me mad<br>
> ><br>
> > Hi All,<br>
> ><br>
> > I apologie if this is off-topic. Please let me know if you think it is.<br>
> ><br>
> > I have been working on my arduino-based pedal, and im faced with a<br>
> > peculiar<br>
> > problem right now. I'm using 8 digital inputs ( 6 on the first socket of<br>
> > the<br>
> > board, inputs 2 through 8, and 2 on the second digital socket, inputs 9<br>
> > and<br>
> > 10). The first 6 inputs work perfectly, but when i want to use any of<br>
> the<br>
> > last two inputs (9 and 10), i have to trigger them twice before they<br>
> start<br>
> > working. Then i'm faced with the exact same problem when i get back to<br>
> the<br>
> > first 6 inputs. I am pretty sure that i used the very same wiring for<br>
> all<br>
> > 8<br>
> > inputs.<br>
> ><br>
> > So... I thought that maybe this could be a problem with firmata or<br>
> pduino<br>
> > (no offense, Hans!). I have been spending the last hour trying to write<br>
> a<br>
> > simple program in the arduino software in order to print in serial<br>
> monitor<br>
> > the values of my digital inputs.<br>
> ><br>
> > Now my question... Is the arduino software just really really bad? Or<br>
> was<br>
> > it<br>
> > just not designed to work on an ubuntu machine? It is randomly very slow<br>
> > at<br>
> > start-up, it randomly disables the serial port menu in Tools, it<br>
> randomly<br>
> > decides to prevent me from uploading the program in the board, or warns<br>
> me<br>
> > that serial port dev/ttyACM0 is already in use, or can't be found. The<br>
> > fact<br>
> > that i unplug and replug the board, or change the usb port, or restart<br>
> the<br>
> > software doesn't seem to make any difference.<br>
> ><br>
> > This is beginning to look more like witchcraft than computer science to<br>
> > me.<br>
> ><br>
> > Please help me, or i'll teach it how to fly out my window.<br>
> ><br>
> > Thank you.<br>
> ><br>
> > Pierre<br>
> ><br>
> > _______________________________________________<br>
> > <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
> > UNSUBSCRIBE and account-management<br>
> > -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > ------------------------------------------------------------------------<br>
> --<br>
> > --<br>
> ><br>
> > Man has survived hitherto because he was too ignorant to know how to<br>
> > realize<br>
> > his wishes. Now that he can realize them, he must either change them,<br>
> or<br>
> > perish. -William Carlos Williams<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > ------------------------------------------------------------------------<br>
> --<br>
> > --<br>
> ><br>
> > Computer science is no more related to the computer than astronomy is<br>
> > related to the telescope. -Edsger Dykstra<br>
> ><br>
> ><br>
> ><br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br>