2024年3月5日 星期二

Python Tkinter First Example

import tkinter as tk


def on_closing():

    root.destroy()


class MainWindow(tk.Tk):

    def __init__(self, *args, **kwargs):

        tk.Tk.__init__(self, *args, **kwargs)


root = MainWindow()

root.title('Main Window')

root.protocol("WM_DELETE_WINDOW", on_closing)

root.geometry('640x480')

root.mainloop()

 

沒有留言:

張貼留言

FPGA/STM32 SPI 實驗

本實驗中,Nucleo H753ZI 當作 SPI Master,PYNQ-Z2 當作 SPI Slave。 使用SPI通訊協定傳送及接收8 Bytes。 腳位設定如下: Nucleo H753ZI 功能 PYNZ-Z2 PD14 CS W9 PA5 SCLK...