It is currently Tue Jan 22, 2019 4:49 am

Reply to topic  [ 1 post ] 
 FreePIE Crashes When Using serialPort.ReadLine() 
Author Message
One Eyed Hopeful

Joined: Mon Apr 30, 2018 5:10 pm
Posts: 1
Reply with quote
The following script works (it outputs the expected values) but when I stop stop the script (using Script>Stop script menu command), it shows the following error message and then crashes:

Had to forcibly shut down script - try removing infinite loops from the script
at ...

import clr
from System import *
global serialPort

def update():
  global serialPort
  line = serialPort.ReadLine() 

if starting:
  global serialPort
  serialPort = IO.Ports.SerialPort("COM10")
  serialPort.BaudRate = 921600
  serialPort.DataBits = 8


I guess the issue is in the line

line = serialPort.ReadLine()

but I'm not sure how to resolve it.

Wed May 16, 2018 5:00 pm
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.