Blinky LED on MSP432 with tkinter

Below is the code for creating a button and pushing data over serial port:

import serial
import tkinter as tk 
from tkinter import *

# creating tkinter window 
root = Tk() 
root.title('MSP432 LED Blink')
root.geometry("500x500")

ser = serial.Serial("COM4", baudrate = 9600, timeout = 1)

def LEDCONTROL():
    ser.write(b'o')  # b indicates that we are sending a byte

on_button= tk.Button(root, text="LED ON/OFF", command=LEDCONTROL)
on_button.grid(row=100, column=100)
               
root.mainloop()

---------------------------------------------

Access the below video for code description:

Access the below link for code description:

Post a Comment

0 Comments