Is this line feed is similar to the line feed (LF) represented by the code 0x0A? Practically, we observe that: \n, ln, and 0x0A do the same job but, the role of \r (0x0D) is not understood. Is this carriage return is similar to the carriage return (CR) represented by 0x0D? After that, the paper goes up one line (auto/manual) this is known as Line Feed. If we look at the case of dot printer/type writer, we observe that the print-head reaches to the end and then it returns to the beginning position this is known as Carriage Return. My understanding is this: the \r (CR = 0x0D) brings the cursor at the beginning of the line if so, the character c should be written over o but, this is not. What does Serial.write('\r') do after the Serial.write('o') command. The execution of the above codes put o and c on the same line one after another, and the presentation is like: oc. Serial.write( 'c' ) // Activate Continuous Function 'c' import serial ser serial.Serial ('COM5', 9600) command b'\x41\x42\x43\x44\x48\圆5\圆c\圆c\圆f' ser.write (command) s ser.read (9) print (s) Share Improve this answer Follow answered at 4:35 user2125048 21 1 Add a comment 2 Termite does support sending and receiving binary data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |