My server that is sending the packet is sending the message as a Uint8Array([1,2,3])
what does that mean? Uint8Array([1,2,3]) is not a type on your arduino...
Upon receiving the packet I simply get a print out that read "[][][]".
char packetBuffer[UDP_TX_PACKET_MAX_SIZE];
Serial.print(packetBuffer);
that code will print garbage because packetBuffer is un-initialized and not a cString, so the print command will try to interpret as ASCII codes whatever is in memory until it finds a null byte.
Or do you mean this is how you declare your UDP reception buffer and there is code (which one?) in between receiving something in the buffer?
(You might be better off depending on your use case with a uint8_t buffer versus chars as you might receive arbitrary data as binary from your UDP session...)
Help us understand what you send and how you receive data, show some code not snippets out of context (see snippets-r-us.com)
PS: of course I assume your serial monitor is set at the right baud speed, otherwise seeing from Serial.print is to be expected
Yes that's not arduino sketch code. That was simply my representation of what's being sent. I have a node.js server sending a packet from a udp socket using the dgram reference: UDP/datagram sockets | Node.js v19.8.1 Documentation
I have read the Udp.read() docs and everything in there is talking about interpreting only ascii characters from the udp message data.
What I'm trying to ask is how do I translate integers out of the array instead?
Without you showing us anything, it's tough to say for sure. It's possible that the values you seek are being sent as bytes, 6 for example is being sent as 6, a byte value as opposed to a printable ASCII character. You want to be sending 54 to the monitor (ASCII 6) so either cast the value to a character or add 48. Just a guess. Show us the code.