[PD] How can I send numer 0-255 to an ardino?

Martin Peach chakekatzil at gmail.com
Mon Mar 15 19:40:57 CET 2021


On Mon, Mar 15, 2021 at 1:36 PM Ingo <ingo at miamiwave.com> wrote:
>
> Hi there,
>
> I'd like to send integers 0-255 to an Arduino with comport.
>
> For text I use [asqseq] to convert it to the ascii numbers that the Arduino
> uses.
> However, I don't know how to send plain integers that come in as the same
> numbers on the Arduino.
>

[comport] accepts Pd floats as input, if those floats are also
integers on 0-255, so you can send directly from a numberbox or
similar. At the arduino end, Serial.read() also outputs bytes on
0-255, so you don't need to translate to and from ascii at all.

Martin



> Thanks!
> Ingo
>
>
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list





More information about the Pd-list mailing list