ME 405
main Namespace Reference

Variables

 adc = pyb.ADCAll(12, 0x70000)
 Initializes the pyb.ADCAll object. More...
 
 i2c = I2C(1, I2C.MASTER, baudrate= 115200)
 Initializes the Nucleo as the MASTER in the I2C interface. More...
 
 start_time = utime.ticks_ms()
 Start time of the data collection. More...
 
 mcp = MCP9808(i2c)
 Initializes the mcp9808 driver using the I2c object. More...
 
 curr_time = utime.ticks_ms()
 Initializes reference voltage of the adc object. More...
 
int time = utime.ticks_diff(curr_time, start_time)/1e3
 
 T_core_C = adc.read_core_temp()
 
int T_core_F = adc.read_core_temp()*9/5 + 32
 
 T_amb_C = mcp.celcius()
 
 T_amb_F = mcp.fahrenheit()
 
 PIN_xm = pyb.Pin(pyb.Pin.cpu.A0)
 The Nucleo pin connected to RTP xm. More...
 
 PIN_xp = pyb.Pin(pyb.Pin.cpu.A1)
 The Nucleo pin connected to RTP xp. More...
 
 PIN_ym = pyb.Pin(pyb.Pin.cpu.A6)
 The Nucleo pin connected to RTP ym. More...
 
 PIN_yp = pyb.Pin(pyb.Pin.cpu.A7)
 The Nucleo pin connected to RTP yp. More...
 
 RTP = RTP(PIN_xm,PIN_xp,PIN_ym,PIN_yp,(176,100),(88,50),debug=False)
 The RTP objct. More...
 
string mode = 'ctr'
 The read mode for testing (ctr obj count) More...
 
 Ts = utime.ticks_us()
 Current Time step. More...
 
int dt = 10**4
 Desired time step in [us]. More...
 
 Tns = utime.ticks_add(Ts,dt)
 Next sample time in [us]. More...
 
int n = 0
 Sample counter. More...
 
int offset = 0
 Time of the first run for offsetting time values. More...
 
int end_time = 15
 End time in seconds. More...
 
list arr_init = [0]*int(end_time/(dt/10**6))
 
 el = array('f',arr_init)
 
 samp_idx = array('f',arr_init)
 
 x_raw = array('f',arr_init)
 
 y_raw = array('f',arr_init)
 
 z = array('f',arr_init)
 
 pos = RTP.scan()
 

Variable Documentation

◆ adc

main.adc = pyb.ADCAll(12, 0x70000)

Initializes the pyb.ADCAll object.

◆ arr_init

list main.arr_init = [0]*int(end_time/(dt/10**6))

◆ curr_time

main.curr_time = utime.ticks_ms()

Initializes reference voltage of the adc object.

◆ dt

int main.dt = 10**4

Desired time step in [us].

◆ el

main.el = array('f',arr_init)

◆ end_time

int main.end_time = 15

End time in seconds.

◆ i2c

main.i2c = I2C(1, I2C.MASTER, baudrate= 115200)

Initializes the Nucleo as the MASTER in the I2C interface.

◆ mcp

main.mcp = MCP9808(i2c)

Initializes the mcp9808 driver using the I2c object.

◆ mode

string main.mode = 'ctr'

The read mode for testing (ctr obj count)

◆ n

int main.n = 0

Sample counter.

◆ offset

main.offset = 0

Time of the first run for offsetting time values.

◆ PIN_xm

main.PIN_xm = pyb.Pin(pyb.Pin.cpu.A0)

The Nucleo pin connected to RTP xm.

◆ PIN_xp

main.PIN_xp = pyb.Pin(pyb.Pin.cpu.A1)

The Nucleo pin connected to RTP xp.

◆ PIN_ym

main.PIN_ym = pyb.Pin(pyb.Pin.cpu.A6)

The Nucleo pin connected to RTP ym.

◆ PIN_yp

main.PIN_yp = pyb.Pin(pyb.Pin.cpu.A7)

The Nucleo pin connected to RTP yp.

◆ pos

main.pos = RTP.scan()

◆ RTP

main.RTP = RTP(PIN_xm,PIN_xp,PIN_ym,PIN_yp,(176,100),(88,50),debug=False)

The RTP objct.

◆ samp_idx

main.samp_idx = array('f',arr_init)

◆ start_time

main.start_time = utime.ticks_ms()

Start time of the data collection.

◆ T_amb_C

main.T_amb_C = mcp.celcius()

◆ T_amb_F

main.T_amb_F = mcp.fahrenheit()

◆ T_core_C

main.T_core_C = adc.read_core_temp()

◆ T_core_F

int main.T_core_F = adc.read_core_temp()*9/5 + 32

◆ time

int main.time = utime.ticks_diff(curr_time, start_time)/1e3

◆ Tns

main.Tns = utime.ticks_add(Ts,dt)

Next sample time in [us].

◆ Ts

main.Ts = utime.ticks_us()

Current Time step.

◆ x_raw

main.x_raw = array('f',arr_init)

◆ y_raw

main.y_raw = array('f',arr_init)

◆ z

main.z = array('f',arr_init)