We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LDCommPort
#6
OK, so it compiles, next is to do the simplest test (probably would have done that first).  I don't have your hardware obviously, but I would start with something as simple as possible that should test the connection.

Code:
result = LDCommPort.AvailablePorts()
TextWindow.WriteLine(result)

result = LDCommPort.OpenPort("COM5",115200)
TextWindow.WriteLine(result)

result = LDCommPort.SetEncoding("ASCII")
TextWindow.WriteLine(result)

result = LDCommPort.TXString("<t 3 50 1>")
TextWindow.WriteLine(result)

If this does work, then put TextWindow.WriteLine debug statements in your code to debug further.

If this doesn't work, then check the port, baudrate command and documentation (parity etc) for the hardware, and any return error messages.
Reply


Messages In This Thread
LDCommPort - by Eddie - 07-13-2025, 05:56 AM
RE: LDCommPort - by litdev - 07-13-2025, 07:28 AM
RE: LDCommPort - by Eddie - 07-13-2025, 09:18 AM
RE: LDCommPort - by litdev - 07-13-2025, 10:19 AM
RE: LDCommPort - by Eddie - 07-13-2025, 12:21 PM
RE: LDCommPort - by litdev - 07-13-2025, 12:49 PM
RE: LDCommPort - by Scout - 07-13-2025, 05:14 PM
RE: LDCommPort - by AbsoluteBeginner - 07-13-2025, 07:06 PM
RE: LDCommPort - by Eddie - 07-14-2025, 01:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)