# Send data to p5.js from another program

**URL:** <https://discourse.processing.org/t/send-data-to-p5-js-from-another-program/24717>\
**Category:** Libraries\
**Created:** [October 19, 2020, 2:57pm UTC](https://discourse.processing.org/t/send-data-to-p5-js-from-another-program/24717 "2020-10-19T14:57:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkscr](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@kkscr](https://discourse.processing.org/u/kkscr)\
**Post date:** [October 19, 2020, 2:57pm UTC](https://discourse.processing.org/t/send-data-to-p5-js-from-another-program/24717/1 "2020-10-19T14:57:33Z")

</div>

Hello !

I have some code written in C for a robot, and I would like to make a simulation with processing.

I want to send data ( the coordinate of a few robots on a map) from my C program to a processing instance. In another words, I want to read on each iteration of my processing loop data generated by my C program.

What is the easiest way to establish this communication ?

write to a fifo file ? send data through serial ?use stdin and stdout ?

If possible I would like to do that with p5.js, as I’m more used to the syntax

Thanks for your help 🙂

---

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [October 19, 2020, 4:08pm UTC](https://discourse.processing.org/t/send-data-to-p5-js-from-another-program/24717/2 "2020-10-19T16:08:06Z")

</div>

Maybe [this one?](https://github.com/genekogan/p5js-osc)
