ME 405 Portfolio
Lab3fe.py File Reference

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...
 

Detailed Description

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

Author
Jacob Everest
Date
Jan. 28, 2021

Function Documentation

◆ sendChar()

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

Parameters
None
Author
Jacob Everest
Date
Jan. 28, 2021

Variable Documentation

◆ arraying

def Lab3fe.arraying = sendChar()

Calls sendChar.

Pulls values from the sendChar function that we made earlier

◆ myList

Lab3fe.myList = myRows.strip('\r\n').split(';')

List Storage.

Strips out unnecessary characters from rows and stores them as a list of values.

◆ myRows

Lab3fe.myRows = ser.readline().decode('ascii')

Rows to save.

Saves values read from sendChar function row by row

◆ ser

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

◆ writer

Lab3fe.writer = csv.writer(f, delimiter='\t')

Data Storage.

Saves values from our list as a csv file