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
LDController
#7
I suspect the time delay is mostly the file operations, apart from the first one that creates the device connection.  Your code (slightly modified to run) worked as expected for me with typically less than 1ms for each LDController.Buttons call.

Code:
DebugFile = Program.Directory+"\LDController.txt"
File.DeleteFile(DebugFile)
DebugLineNo = 1

While ("True")
 
  time1 = Clock.ElapsedMilliseconds
  LDButtons = LDController.Buttons(1)
  time2 = Clock.ElapsedMilliseconds
  LDRecord = LDButtons + "  " + (time2-time1)
  File.WriteLine(DebugFile, DebugLineNo, LDRecord)
  DebugLineNo = DebugLineNo + 1

  Program.Delay(5)

EndWhile
Reply


Messages In This Thread
LDController - by GBHalford - 10-01-2024, 05:35 AM
RE: LDController - by AbsoluteBeginner - 10-01-2024, 07:06 AM
RE: LDController - by litdev - 10-01-2024, 07:48 AM
RE: LDController - by GBHalford - 10-01-2024, 09:38 AM
RE: LDController - by litdev - 10-01-2024, 09:47 AM
RE: LDController - by GBHalford - 10-01-2024, 10:14 AM
RE: LDController - by litdev - 10-01-2024, 10:33 AM
RE: LDController - by z-s - 10-01-2024, 01:05 PM
RE: LDController - by GBHalford - 10-02-2024, 03:36 AM
RE: LDController - by z-s - 10-02-2024, 05:18 AM
RE: LDController - by litdev - 10-02-2024, 05:33 AM
RE: LDController - by GBHalford - 10-02-2024, 06:10 AM
RE: LDController - by z-s - 10-02-2024, 08:57 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)