(You cannot see the "2" marker because it's under "3")


How do I get such a result with the RS485 board?
2277 Views - Created 22/01/2019
22/01/2019
Posted by:
xlp512
22/01/2019
Posted by:
xlp512
22/01/2019
Posted by:
xlp512
26/02/2019
Posted by:
lippo
#!/usr/bin/env pythonimport serialdef main(): ''' Main Function ''' port = serial.Serial("/dev/ttyAMA0", baudrate=115200) # flush buffers port.reset_input_buffer() port.reset_output_buffer() # send a string to the slave port.write(b'123456789\n') # read the port until a newline character is found byteData = port.readline() print(str(byteData))if __name__ == "__main__": main()
#!/usr/bin/env pythonimport serialdef main(): ''' Main Function ''' port = serial.Serial("/dev/ttyAMA0", baudrate=115200) # flush buffers port.reset_input_buffer() port.reset_output_buffer() # read the port until a newline character is found and # write that data back to the port while(1): byteData = port.readline() port.write(byteData) print(str(byteData))if __name__ == "__main__": main()
03/03/2021
Posted by:
AsaGong
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view, download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.