Search found 66 matches: IsSerialPort
Searched query: +IsSerialPort
- Mon May 05, 2025 7:02 pm
- Forum: General Discussion
- Topic: Notepad++ Support for PureBasic?
- Replies: 4
- Views: 1110
Re: Notepad++ Support for PureBasic?
... IsMenu IsMesh IsModule IsMovie IsMusic IsNaN IsNode IsParticleEmitter IsPathEmpty IsProgram IsRegularExpression IsRuntime IsScreenActive IsSerialPort IsSound IsSound3D IsSprite IsSprite3D IsStaticGeometry IsStatusBar IsSysTrayIcon IsText3D IsTexture IsThread IsToolBar IsWindow IsWindow3D IsXML ...
- Sat Jan 11, 2025 4:55 pm
- Forum: Tricks 'n' Tips
- Topic: Program to test and calibrate servomotors with arduino
- Replies: 5
- Views: 5824
Re: Program to test and calibrate servomotors with arduino
... logic with the buffers is a bit ... complicated.
I simplified it a bit:
Procedure vaciarserial(puerto.i=#serie)
Protected Byte.a
If IsSerialPort(puerto)
While AvailableSerialPortInput(puerto)
ReadSerialPortData(puerto, @Byte, 1)
Wend
EndIf
EndProcedure
And the port needs to be an ...
I simplified it a bit:
Procedure vaciarserial(puerto.i=#serie)
Protected Byte.a
If IsSerialPort(puerto)
While AvailableSerialPortInput(puerto)
ReadSerialPortData(puerto, @Byte, 1)
Wend
EndIf
EndProcedure
And the port needs to be an ...
- Mon Jan 06, 2025 7:44 pm
- Forum: Tricks 'n' Tips
- Topic: Program to test and calibrate servomotors with arduino
- Replies: 5
- Views: 5824
Program to test and calibrate servomotors with arduino
... puertosCOM
baudios.l=PeekL(?valoresbaudios+GetGadgetState(#baudios)*SizeOf(Long))
PuertoCOM$=GetGadgetText(#puertosCOM)
If PuertoCOM$
While IsSerialPort(#serie)
vaciarserial(#serie)
CloseSerialPort(#serie)
Wend
;Delay(1)
If OpenSerialPort(#serie,PuertoCOM$,baudios,#PB_SerialPort_NoParity,8,0 ...
baudios.l=PeekL(?valoresbaudios+GetGadgetState(#baudios)*SizeOf(Long))
PuertoCOM$=GetGadgetText(#puertosCOM)
If PuertoCOM$
While IsSerialPort(#serie)
vaciarserial(#serie)
CloseSerialPort(#serie)
Wend
;Delay(1)
If OpenSerialPort(#serie,PuertoCOM$,baudios,#PB_SerialPort_NoParity,8,0 ...
- Thu Feb 09, 2023 8:52 pm
- Forum: Coding Questions
- Topic: StringGadget not updating
- Replies: 6
- Views: 674
StringGadget not updating
... Gadget
Select GadgetID
Case #Gadget_Form1_ComboBox1
GetAvailableComPorts()
SerialPort.s = GetGadgetText(#Gadget_Form1_ComboBox1)
If Not IsSerialPort(#SERIAL_PORT)
OpenSerialPort(#SERIAL_PORT, SerialPort, 115200, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1024, 1024)
EndIf ...
Select GadgetID
Case #Gadget_Form1_ComboBox1
GetAvailableComPorts()
SerialPort.s = GetGadgetText(#Gadget_Form1_ComboBox1)
If Not IsSerialPort(#SERIAL_PORT)
OpenSerialPort(#SERIAL_PORT, SerialPort, 115200, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1024, 1024)
EndIf ...
- Mon Sep 26, 2022 3:51 pm
- Forum: Feature Requests and Wishlists
- Topic: Try/Catch/Finally error handling...
- Replies: 45
- Views: 19144
Re: Try/Catch/Finally error handling...
... IsMenu, IsMesh, IsMovie, IsMusic, IsNaN, IsNode, IsParticleEmitter, IsPathEmpty, IsProgram, IsRegularExpression, IsRuntime, IsScreenActive, IsSerialPort, IsSound, IsSound3D, IsSprite, IsStaticGeometry, IsStatusBar, IsSysTrayIcon, IsText3D, IsTexture, IsThread, IsToolBar, IsWindow, IsWindow3D ...
- Mon Apr 25, 2022 5:05 pm
- Forum: Tricks 'n' Tips
- Topic: Some playing with ucontroller (arduino)
- Replies: 7
- Views: 1166
Re: Some playing with ucontroller (arduino)
... puertosCOM
baudios.l=PeekL(?valoresbaudios+GetGadgetState(#baudios)*SizeOf(Long))
PuertoCOM$=GetGadgetText(#puertosCOM)
If PuertoCOM$
While IsSerialPort(#serie)
vaciarserial(#serie)
CloseSerialPort(#serie)
Wend
;Delay(1)
If OpenSerialPort(#serie,PuertoCOM$,baudios,#PB_SerialPort_NoParity,8,0 ...
baudios.l=PeekL(?valoresbaudios+GetGadgetState(#baudios)*SizeOf(Long))
PuertoCOM$=GetGadgetText(#puertosCOM)
If PuertoCOM$
While IsSerialPort(#serie)
vaciarserial(#serie)
CloseSerialPort(#serie)
Wend
;Delay(1)
If OpenSerialPort(#serie,PuertoCOM$,baudios,#PB_SerialPort_NoParity,8,0 ...
- Sat Apr 16, 2022 6:10 pm
- Forum: Tricks 'n' Tips
- Topic: Some playing with ucontroller (arduino)
- Replies: 7
- Views: 1166
Some playing with ucontroller (arduino)
... Menu,3))
Case 4
baudios=115200:SetGadgetState(#baudios,9); <- 115200 baudios
PuertoCOM$=GetGadgetText(#puertosCOM)
If PuertoCOM$
If IsSerialPort(#serie)
enviarserial("re")
Delay(140)
; enviar dato de baudios nuevos
*baseserie\ubit32[0]=baudios
enviarserial("ba")
While IsSerialPort ...
Case 4
baudios=115200:SetGadgetState(#baudios,9); <- 115200 baudios
PuertoCOM$=GetGadgetText(#puertosCOM)
If PuertoCOM$
If IsSerialPort(#serie)
enviarserial("re")
Delay(140)
; enviar dato de baudios nuevos
*baseserie\ubit32[0]=baudios
enviarserial("ba")
While IsSerialPort ...
- Tue Dec 07, 2021 3:22 pm
- Forum: Raspberry PI
- Topic: Serial Ports, IO-Ports, I2C and the use of PIGPIO Library
- Replies: 15
- Views: 10008
Re: Serial Ports, IO-Ports, I2C and the use of PIGPIO Library
... SerialS, device.s, baudrate.i, parity.i = #PB_SerialPort_NoParity, dataBits.i = 8, stopBit.i = 1, handShake.i = #PB_SerialPort_NoHandshake)
If IsSerialPort(*this\handle)
CloseSerialPort(*this\handle)
EndIf
*this\handle = OpenSerialPort(#PB_Any, device, baudrate, parity, dataBits, stopBit ...
If IsSerialPort(*this\handle)
CloseSerialPort(*this\handle)
EndIf
*this\handle = OpenSerialPort(#PB_Any, device, baudrate, parity, dataBits, stopBit ...
- Fri Apr 23, 2021 10:22 pm
- Forum: Coding Questions
- Topic: Lost serial port error
- Replies: 6
- Views: 1517
Lost serial port error
... for some way to signal that the serial port has been lost (for example by unplugging the USB-SERIAL converter). The recommended function IsSerialPort() does not return an error (zero value) if the port was previously opened correctly (I tested it in Windows). So how can I determine that ...
- Thu Jun 25, 2020 2:42 pm
- Forum: Feature Requests and Wishlists
- Topic: IsConnection(Connection)
- Replies: 0
- Views: 1221
IsConnection(Connection)
Hi
When using serial ports there is a function called IsSerialPort() that can be used to determine if the serial port has been correctly initialized etc. I would like to suggest an IsConnection(Connection) function that can be used to determine if the Connection is valid. This would avoid errors with ...
When using serial ports there is a function called IsSerialPort() that can be used to determine if the serial port has been correctly initialized etc. I would like to suggest an IsConnection(Connection) function that can be used to determine if the Connection is valid. This would avoid errors with ...
- Sat Dec 14, 2019 10:50 pm
- Forum: Coding Questions
- Topic: Serial Port comunication witch arduino
- Replies: 48
- Views: 12446
Re: Serial Port comunication witch arduino
... Procedure open_port()
OpenSerialPort(#compoort, port$ ,115200,#PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1, 1)
If IsSerialPort(#compoort)<>0 And verbonden=1
SetGadgetText(#state,port$+"=OPEN")
SetGadgetColor(#state,#PB_Gadget_BackColor,$A7EC16)
Else
port_error ...
OpenSerialPort(#compoort, port$ ,115200,#PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1, 1)
If IsSerialPort(#compoort)<>0 And verbonden=1
SetGadgetText(#state,port$+"=OPEN")
SetGadgetColor(#state,#PB_Gadget_BackColor,$A7EC16)
Else
port_error ...
- Wed Dec 11, 2019 11:07 pm
- Forum: Coding Questions
- Topic: Serial Port comunication witch arduino
- Replies: 48
- Views: 12446
Re: Serial Port comunication witch arduino
... Port$ + "=OPEN")
SetGadgetColor(#state, #PB_Gadget_BackColor, $A7EC16)
Break
Else
CloseSerialPort(#compoort)
EndIf
EndIf
Next
If Not IsSerialPort(#compoort)
port_error()
EndIf
EndProcedure
Procedure zend()
If IsSerialPort(#compoort)
WriteSerialPortString(#compoort, GetGadgetText ...
SetGadgetColor(#state, #PB_Gadget_BackColor, $A7EC16)
Break
Else
CloseSerialPort(#compoort)
EndIf
EndIf
Next
If Not IsSerialPort(#compoort)
port_error()
EndIf
EndProcedure
Procedure zend()
If IsSerialPort(#compoort)
WriteSerialPortString(#compoort, GetGadgetText ...
- Wed Dec 11, 2019 8:11 pm
- Forum: Coding Questions
- Topic: Serial Port comunication witch arduino
- Replies: 48
- Views: 12446
Re: Serial Port comunication witch arduino
... Procedure open_port()
OpenSerialPort(#compoort, port$ ,115200,#PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1, 1)
If IsSerialPort(#compoort)<>0 And verbonden=1
SetGadgetText(#state,port$+"=OPEN")
SetGadgetColor(#state,#PB_Gadget_BackColor,$A7EC16)
Else
port_error ...
OpenSerialPort(#compoort, port$ ,115200,#PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 1, 1)
If IsSerialPort(#compoort)<>0 And verbonden=1
SetGadgetText(#state,port$+"=OPEN")
SetGadgetColor(#state,#PB_Gadget_BackColor,$A7EC16)
Else
port_error ...
- Tue Sep 10, 2019 4:24 pm
- Forum: Feature Requests and Wishlists
- Topic: Try/Catch/Finally error handling...
- Replies: 45
- Views: 19144
Re: Try/Catch/Finally error handling...
... IsMenu, IsMesh, IsMovie, IsMusic, IsNaN, IsNode, IsParticleEmitter, IsPathEmpty, IsProgram, IsRegularExpression, IsRuntime, IsScreenActive, IsSerialPort, IsSound, IsSound3D, IsSprite, IsStaticGeometry, IsStatusBar, IsSysTrayIcon, IsText3D, IsTexture, IsThread, IsToolBar, IsWindow, IsWindow3D ...
- Mon Aug 12, 2019 5:05 am
- Forum: Coding Questions
- Topic: IsSerialPort()
- Replies: 10
- Views: 2826
Re: IsSerialPort()
Windows detects the removal of open commports immedeately, as you can observe in the device manager. Once disconnected and connected again, it is a complete new port and can be opened.
Another thing is how the running program is informed about the removal.
I found a very simple solution to end my ...
Another thing is how the running program is informed about the removal.
I found a very simple solution to end my ...