Jump to content
mrtweaver

Convert Python to Autoit

Recommended Posts

mrtweaver

I can use the following python code to control a USB relay module, i am trying to figure out which UDFs i would need in my include to do the same in autoit

import serial
import time
 
fd=serial.Serial("COM3",9600)
time.sleep(1)
fd.write('x50')
time.sleep(0.5)
fd.write('x51')
 
def relay_1():
    fd.write('x00')
    time.sleep(1)
fd.write('x01')
 
if __name__ == "__main__":
relay_1()

Share this post


Link to post
Share on other sites
Danyfirex

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×