CanSat-India-Updated / GUI / cansat india 3 / send.py
send.py
Raw
import serial
import time
# Open the serial port
ser = serial.Serial('COM3', 9600)
n=10
while n>0:
    # Write data to the serial port
    data = "Hello, Arduino! :"
    time.sleep(1)
    ser.write(data.encode())
    print(22222222)
    n=n-1
    if n==0:
        ser.close()
        exit()