Send data to Ctrl
Program the F1 Starter Kit for data upload
Add the following code to default main.py:
# Import what is necessary to create a thread import time import math # Send data continuously to Ctrl while True: for i in range(0,20): ctrl.send_signal(1, math.sin(i/10*math.pi)) #use signal #1 print('sent signal {}'.format(i)) time.sleep(10)
Now it’s time to test your code, use File->Save / ctrl-S to save your edit to main.py, and press the Reset button on the Starter Kit to reboot your device.
Since main.py persists on your device even after reboot. It will run forever after the device boot up, in order to stop the script, click onto the CtrlR terminal, and press ctrl-c on your keyboard.
Check the raw data of your signal
Add a widget for the signal