![]() WriteSerialPortString(Port, *ParameterTx$, #PB_Ascii)ĭefine ComParameter.ComParameterStructure PostEvent(#Com_Event_RxBytes, 0, 0, 0, RxBytes) Port = OpenSerialPort(#PB_Any, *ParameterCOM$, 1200, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 128, 128) Procedure ComThread(*Parameter.ComParameterStructure) MessageRequester('Info', 'Enable Thread-Safe in compiler options!') Last edited by infratec on Sat 10:54 pm, edited 1 time in total. OpenSerialPort(0,'COM9',1200,#PB_SerialPort_NoParity,8,1,#PB_SerialPort_NoHandshake,1024,16)īut if you do something with more data, you'll need an own thread for the serial stuff. If ReadSerialPortData(#port, 1) Read ByteĪddGadgetItem(0, -1, RSet(Hex(Byte, #PB_Byte), 2, '0') + #LF$ + Str(Byte) + #LF$ + Chr(Byte))ĭefine flags = #PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget ![]() While AvailableSerialPortInput(#port) > 0 ![]() SetGadgetText(#text,'VOLTAGE ='+ text + ' V') Why is it not possible the get the chars from adres ? I try so many ohter things but I do not understand it do not work How to read the data that start at adres ? Ptr + 1 incr the adres to put the next charĭebug recv nothing show in the debugwindow ? ReadSerialPortData(#port, + Ptr, 1) =adres to place the data ,I suppose ? Procedure Read_Arduino1() this drive me crazy,I can not understand pointers If Event = #PB_Event_Timer And EventTimer() = #sec if timer event read arduino OpenSerialPort(#Port, Port$, 9600, #PB_SerialPort_NoParity, 8, 1, #PB_SerialPort_NoHandshake, 64, 64) ![]() LoadFont(#font,'caladea',14, #PB_Font_Italic|#PB_Font_Bold)ĪddWindowTimer(#Win, #Sec, 500) read every 500 ms OpenWindow(#Win, 0, 0, 500, 300, ', #PB_Window_SystemMenu | #PB_Window_ScreenCentered) ![]() Program that read an analog voltage from an arduino with serial port ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |