Tuesday afternoon - I have made a python-based GUI (using tkinter) to control the bipolar stepper motor from my last assignment. I would like to try making a phone app next.
1. USB serial communication/Python-tkinter GUI
Since I was using many jumper wires for the first time (I connected the FTDI cable to GND,MOSI,MISO pins on the pin header for ISP), I was feeling unsure about the whole exercise all the time and kept checking the connections every now and then.
I wrote this code in Arduino IDE and flashed it into the ATtiny44 on my board. I tried if the serial communication is happening using Arduino serial monitor. It did. When 'c' was typed and sent, the motor rotated clockwise and did the opposite direction when 'a' was sent.
I wrote this python code, importing tkinter and pyserial. It was a good experience figuring out how to write this code. I learnt about the role of the period operator in object-oriented programming to understand classes and functions. I also read about 'button' and 'pack' operations in tkinter.
After a lot of debugging (including soldering bugs!), the programme worked and I whooped in joy when the motor obeyed the GUI.