2年前くらいに作ったプログラムをM5Stackに書き込んだら、以下のエラーが出た。
Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400d2bac: 8b2502ad 00000008 21004136
原因を調べてみたら関数の戻り値の型をintにしているのに、戻り値が無かったので
intをvoidに修正したら直った。
2年前くらいに作ったプログラムをM5Stackに書き込んだら、以下のエラーが出た。
Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400d2bac: 8b2502ad 00000008 21004136
原因を調べてみたら関数の戻り値の型をintにしているのに、戻り値が無かったので
intをvoidに修正したら直った。
import tkinter as tk
def change_font_size():
btn.config(font=("Noto Sans CJK JP", 10))
root = tk.Tk()
frm = tk.Frame(root,width=200,height=200)
frm.propagate(0)
frm.place(x=0,y=0)
btn = tk.Button(frm, text="open",font=("Noto Sans CJK JP", 20),width=200,height=200, command=change_font_size)
btn.pack()
root.mainloop()