Untitled
unknown
plain_text
13 days ago
494 B
3
Indexable
Never
// Create a vector to hold the bytes std::vector<uint8_t> dataToSend; // Add the integers to the vector (assuming 1 byte per integer) dataToSend.push_back(static_cast<uint8_t>(my_number_1)); dataToSend.push_back(static_cast<uint8_t>(my_number_2)); dataToSend.push_back(static_cast<uint8_t>(my_number_3)); dataToSend.push_back(static_cast<uint8_t>(my_number_4)); // Send the data as raw bytes serialPort.Write(std::string(dataToSend.begin(), dataToSend.end()));
Leave a Comment