I am trying to send the data calculated on Python to an Arduino but I think below method sends the whole double at one clock cycle. How can I split this into a byte array and send one byte at a time?
ser.write(bytes(round(i * double(self.amplitude), 5)))
ser = serial.Serial(
port=self.outputFile,
baudrate=115200,
parity=serial.PARITY_ODD,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)
for i in created_wave:
ser.write(bytes(round(i * double(self.amplitude), 5)))