Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Win32 Serial Under Windows 7

by dasgar (Priest)
on Apr 03, 2018 at 18:48 UTC ( #1212279=note: print w/replies, xml ) Need Help??


in reply to Re^2: Win32 Serial Under Windows 7
in thread Win32 Serial Under Windows 7

I downloaded a serial monitoring program and I can see the packets coming and going to the Arduino when I run my script

Based on that description, you have confirmed that "something" is being sent from both sides. If you can get logging going from your Perl code, that would help you to verify that your code is actually sending what you think it is sending and verify exactly what it is receiving. This will help you to catch issues such as extra/missing white space characters (like carriage returns and line feeds) in what you send. By verifying what your code actually receives, you can debug the portions of your code that is reading the data sent from the device by seeing if it is processing the incoming data properly.

Another debugging method would be to use something like putty to manually connect to the device to try to interact with it manually. If that's not working, then there might be other issues that need to be addressed first.

I tried changing the timing to read the data coming it

Have you looked into the buffering aspect of things?

Another thing you can check is to see if you're using the same versions of Perl and the Win32::SerialPort module on both systems.

Replies are listed 'Best First'.
Re^4: Win32 Serial Under Windows 7
by PilotinControl (Pilgrim) on Apr 03, 2018 at 19:03 UTC
    Good News. I just used putty and it connected to the arduino just fine....I have a button connected to a a relay and an led. I just pressed the button and the feedback was sent back to the console screen on Putty. So it does work just as it does on Windows Vista and XP. I will add logging to the perl code and see what that turns up. Same version of perl and win32 serial port on windows vista, 7 and 10.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1212279]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2021-01-18 01:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?