for some reason my digital write square wave statements are not fully working.
Is it possible that a regular digital write statement might be messing with it?
Oh boy, this VI is way too big!
You really should learn to implement better programming structures, like statemachines, producer-consumer and other stuff!
And you REALLY need to learn how your computer communicates with your Arduino: it's a (virtual) serial port! You send a command, the Arduino executes the command and (maybe) sends a response. Then you can send the next command!
Right now there are several loops running in parallel, some of them as fast as possible. And they all want to communicate with your (small and tiny) Arduino: I guess you overestimate its processing power by magnitudes…
Best regards, GerdW
using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019