# Gateway Serial Module writeBytes hex

**URL:** <https://forum.inductiveautomation.com/t/gateway-serial-module-writebytes-hex/75298>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [June 20, 2023, 6:35pm UTC](https://forum.inductiveautomation.com/t/gateway-serial-module-writebytes-hex/75298 "2023-06-20T18:35:11Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Tom\_Grotenhuis](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@Tom\_Grotenhuis](https://forum.inductiveautomation.com/u/Tom_Grotenhuis)\
**Post date:** [June 20, 2023, 9:30pm UTC](https://forum.inductiveautomation.com/t/gateway-serial-module-writebytes-hex/75298/4 "2023-06-20T21:30:13Z")

</div>

Dang you are fast.

My apologies for my ignorance. I had a feeling I was murdering the requirements for the array.

Would you be able to walk me through constructing a simple 2-byte array that can handle unsigned values and is a valid argument for **system.serial.writeBytes**?  
So far I've been taking guidance from these forum posts but am lost as how to construct the array:  
[https://forum.inductiveautomation.com/t/serial-module-possible-error/5920/11](https://forum.inductiveautomation.com/t/serial-module-possible-error/5920/11)  
[https://forum.inductiveautomation.com/t/solved-get-nmea-sentence-system-serial/48783](https://forum.inductiveautomation.com/t/solved-get-nmea-sentence-system-serial/48783)

Again, my apologies for the ignorance. Any help is appreciated. Thank you!

---

_[View the full topic](https://forum.inductiveautomation.com/t/gateway-serial-module-writebytes-hex/75298)._
