CALPOLY MECHATRONICS
Documentation for all Mechatronics Labs
me405_lab3.py File Reference

This module runs on the nucleo and sends and recieves data from the pc. More...

Functions

def me405_lab3.send (data)
 A method used to send data to the pc over serial. More...
 

Variables

 me405_lab3.myuart = UART(3)
 
 me405_lab3.adcBuffer = array.array('H', (0 for i in range(5000)))
 
 me405_lab3.pinA1 = pyb.Pin.cpu.A1
 
 me405_lab3.adcTimer = pyb.Timer(1, freq=50000)
 
 me405_lab3.adc1 = pyb.ADC(pinA1)
 
bool me405_lab3.record = False
 
 me405_lab3.val = myuart.readchar()
 

Detailed Description

This module runs on the nucleo and sends and recieves data from the pc.

When the user sends the nucleo 'g' from me405_lab3_front_end.py the nucleo begins reading adc data from the blue user button. Once the nucleo has captured a button release it sends the recorded adc data to the pc.

Author
Eliot Briefer
Date
May 6, 2020

Function Documentation

◆ send()

def me405_lab3.send (   data)

A method used to send data to the pc over serial.

This method writes each element in data to serial one line at a time.

Parameters
dataAn itterable object to write line by line to serial. (typically a list or array)