# Serial read() Arduino

**URL:** <https://discourse.processing.org/t/serial-read-arduino/42689>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [September 1, 2023, 2:10pm UTC](https://discourse.processing.org/t/serial-read-arduino/42689 "2023-09-01T14:10:23Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [September 1, 2023, 7:33pm UTC](https://discourse.processing.org/t/serial-read-arduino/42689/5 "2023-09-01T19:33:49Z")

</div>

> [@Map function worked in Processing 2 and early 3.. But broke in 3.5.3. Need guidance](https://discourse.processing.org/t/map-function-worked-in-processing-2-and-early-3-but-broke-in-3-5-3-need-guidance/11371/2):
>
> Mutating the sketch’s main canvas outside the “Animation Thread” crashes the program! boomCallback serialEvent() is run by the Serial’s Thread btW. warningSo even calling something like background() can be fatal! fearfulActually, due to a bad design, any Processing function which depends on color() will get wrong results when they’re multithreading invoked! bugSo any canvas mutating operations should be moved to draw() or called by it. face_with_monocleHere’s a post link for…

---

_[View the full topic](https://discourse.processing.org/t/serial-read-arduino/42689)._
