|
| | 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() |
| |