diff --git a/drivers/pid_controller/pid_controller.ipynb b/drivers/pid_controller/pid_controller.ipynb index 60c28283638144475f18a4b5eabe584bbd092f4c..555496f92a3792154ac3bad61e3976fdff22754b 100644 --- a/drivers/pid_controller/pid_controller.ipynb +++ b/drivers/pid_controller/pid_controller.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 6, "id": "a9d77d5f", "metadata": {}, "outputs": [], @@ -95,7 +95,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 7, "id": "2611e40e", "metadata": {}, "outputs": [ @@ -108,21 +108,24 @@ } ], "source": [ - "relay = rl20001.RL20001('COM6')" + "relay = rl20001.RL20001('COM4')" ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 13, "id": "f191cd93", "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "RL20001: Communication Error Detected\n" - ] + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ @@ -131,27 +134,33 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 16, "id": "8a441d0a", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "relay.turnOn()" + ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "id": "41805be6", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "relay.turnOff()" + ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "id": "dbdb50c6", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "relay.close()" + ] }, { "cell_type": "code", @@ -377,10 +386,60 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 17, "id": "227a9eed", "metadata": {}, "outputs": [], + "source": [ + "dataa = '1686756740.7555332,31.015958,30.690639,30.796316,30.002601'\n", + "data = dataa.split(',')" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "3c6327de", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1686756740.7555332\n" + ] + } + ], + "source": [ + "print(data[0])" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "id": "ef44dfda", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[31.015958, 30.690639, 30.796316, 30.002601]" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "[float(x) for x in data[1:]]" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f3ffdc44", + "metadata": {}, + "outputs": [], "source": [] } ],