Button Step. More...
Functions | |
| def | Lab3fe.sendChar () |
| G character. More... | |
Variables | |
| Lab3fe.ser = serial.Serial(port='COM4',baudrate=115200,timeout=5) | |
| Open serial port. More... | |
| def | Lab3fe.arraying = sendChar() |
| Calls sendChar. More... | |
| Lab3fe.myRows = ser.readline().decode('ascii') | |
| Rows to save. More... | |
| Lab3fe.myList = myRows.strip('\r\n').split(';') | |
| List Storage. More... | |
| Lab3fe.writer = csv.writer(f, delimiter='\t') | |
| Data Storage. More... | |
Button Step.
This side of the code asks you to press g, then sends that off to the back end. It then waits for the back end to send values back and then ideally it would split them up and plot them. Unfortunately, because my microcontroller was broken for 4 of the 7 days we had to do this, thats not exactly happening. Nevertheless, I plan to work on this more and get it working at some point, even if it's not graded
| def Lab3fe.sendChar | ( | ) |
G character.
asks you to press a character then sends that character to the microcontroller. At this point it does not work and I know that. however, it is late, I am getting unreasonably frustrated, and not making any progress in this state. Hopefully I can scrape up points for organization, documentation, and submission now, and then I will make it work later
| None |
| def Lab3fe.arraying = sendChar() |
Calls sendChar.
Pulls values from the sendChar function that we made earlier
| Lab3fe.myList = myRows.strip('\r\n').split(';') |
List Storage.
Strips out unnecessary characters from rows and stores them as a list of values.
| Lab3fe.myRows = ser.readline().decode('ascii') |
Rows to save.
Saves values read from sendChar function row by row
| Lab3fe.ser = serial.Serial(port='COM4',baudrate=115200,timeout=5) |
Open serial port.
Creates a Serial object through which we will communicate with the nucleo
| Lab3fe.writer = csv.writer(f, delimiter='\t') |
Data Storage.
Saves values from our list as a csv file