Keep p5.serial port open while mac screen is closed

Hi guys,

I attached an Arduino to P5 SERIAL CONTROL.

I want to keep the port open while my mac is closed (For an exhibition I’m having).

I tried to change the preferences of the Mac battery so it will continue to work while it closed but in the second I close the mac the port is also closed.

Do you have any suggestions on what I can do?