This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os, sys | |
| from yoctopuce.yocto_api import * | |
| from yoctopuce.yocto_lightsensor import * | |
| import datetime | |
| import csv | |
| errmsg = YRefParam() | |
| # Setup the API to use local USB devices | |
| if YAPI.RegisterHub("usb", errmsg) != YAPI.SUCCESS: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function [screen, yscale] = eyediagram_dense(signal, time, rep) | |
| % EYEDIAGRAM_DENSE Creates a very pretty eyediagram compared to MATLAB's default rubbish. | |
| % uses the same arguments as matlab's eyediagram function | |
| scr = 500; | |
| num2delete = rep*mod(numel(signal)/rep,1); | |
| num2delete = round(num2delete); | |
| signal = signal((num2delete + 1):end); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function [interference_present] = detect_interference(dataRX) | |
| % takes a structure `dataRX` which has fields `x` and `y` which is an | |
| % oscilloscope capture. | |
| % Returns a boolean if interference is detected | |
| % tested bands are defined in this function, below. | |
| % use this function to determine if the capture has interference. | |
| % this can be used to cause an error and then place capture code in a 'try catch' block. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Arrows: | |
| Dash, Equals | |
| Greek | |
| Superscripts | |
| Type formatting - Mathbb and Bold | |
| Mathcal P for powersets | |
| Scientific Constants | |
| Sum, Integral, Product, Sqrt, Not, cdot for multiply |
NewerOlder