Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
5
  • raw_data is a char vector, so when reading from Serial cast it to a char: raw_data[i] = (char)Serial.read() Commented Dec 8, 2017 at 11:00
  • Thank you for the suggestion. I tried it and it still works with Serial Monitor but not with Python... Commented Dec 8, 2017 at 12:19
  • What is device.read() supposed to do? Commented Dec 8, 2017 at 14:37
  • I'm printing the data the Arduino has received back to the serial port, so the device.read() should read it and print it. I made a mistake in the code I copied across – it should be print device.read(). Commented Dec 8, 2017 at 15:41
  • flagged for moving to arduino specific community. tks, tg Commented Jul 25, 2019 at 15:13

lang-py

AltStyle によって変換されたページ (->オリジナル) /