Skip to content

Commit 4983c2b

Browse files
Add files via upload
1 parent 8b8d905 commit 4983c2b

File tree

5 files changed

+103
-14
lines changed

5 files changed

+103
-14
lines changed

00. Anaconda Install.ipynb

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Anaconda Install\n",
8+
"### If you're reading this from the downloaded version off github and you're running this with Jupyter, you can skip this lesson.\n",
9+
"\n",
10+
"## [Download Anaconda to use Jupyter](https://docs.anaconda.com/anaconda/install/) or [watch a video on how to do it](https://youtu.be/LrMOrMb8-3s).\n",
11+
"### (Please use the two links above if you want to use the downloaded files, from [github](https://github.com/BaconBomber/BeginnersTCLab), but can't run Jupyter. Jupyter is a program run from [Anaconda](https://www.anaconda.com/))"
12+
]
13+
},
14+
{
15+
"cell_type": "code",
16+
"execution_count": 2,
17+
"metadata": {},
18+
"outputs": [
19+
{
20+
"name": "stderr",
21+
"output_type": "stream",
22+
"text": [
23+
"C:\\Users\\eric\\Anaconda3\\lib\\site-packages\\IPython\\core\\display.py:689: UserWarning: Consider using IPython.display.IFrame instead\n",
24+
" warnings.warn(\"Consider using IPython.display.IFrame instead\")\n"
25+
]
26+
},
27+
{
28+
"data": {
29+
"text/html": [
30+
"<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/LrMOrMb8-3s\" \f",
31+
"rameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen></iframe>"
32+
],
33+
"text/plain": [
34+
"<IPython.core.display.HTML object>"
35+
]
36+
},
37+
"metadata": {},
38+
"output_type": "display_data"
39+
}
40+
],
41+
"source": [
42+
"from IPython.core.display import display, HTML\n",
43+
"def video(key):\n",
44+
" display(HTML('<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/'+key+'\" \\frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen></iframe>'))\n",
45+
"\n",
46+
"video('LrMOrMb8-3s')"
47+
]
48+
}
49+
],
50+
"metadata": {
51+
"kernelspec": {
52+
"display_name": "Python 3",
53+
"language": "python",
54+
"name": "python3"
55+
},
56+
"language_info": {
57+
"codemirror_mode": {
58+
"name": "ipython",
59+
"version": 3
60+
},
61+
"file_extension": ".py",
62+
"mimetype": "text/x-python",
63+
"name": "python",
64+
"nbconvert_exporter": "python",
65+
"pygments_lexer": "ipython3",
66+
"version": "3.7.3"
67+
}
68+
},
69+
"nbformat": 4,
70+
"nbformat_minor": 2
71+
}

01. Overview.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"# Python Knowledge Interactive\n",
88
"\n",
99
"## ***Background:***\n",
10-
"You have a chicken egg you really want to hatch, but you don't want to sit around forever, checking the temperture and adjusting heaters. The best way to do this you found, was control it using python. Unfortunately, you only get one try to get this right. Fortunately, you have a simulator of the incubator so you can practice python, without having to worry about mistakes. \n",
10+
"You have a chicken egg you really want to hatch, but you don't want to sit around forever, checking the temperture and adjusting heaters. The best way to do this you found, was control it using python. Unfortunately, you only get one try to get this right. But, you have a simulator of the incubator so you can practice python, without having to worry about mistakes. \n",
1111
"\n",
1212
"## ***Introduction:***\n",
1313
"Every programmer must get some background knowledge before using the language more complexly. So if you want to do well in the second, complex part, that will better monitor the egg you should for sure work through the basic information. For the people who already have experience with python and think this doesn’t apply to you, this background knowledge is different because it uses the temperature control lab to help teach basics and if you don't do it part two won't be so easy.\n",
@@ -28,7 +28,7 @@
2828
"\n",
2929
"(It is best to follow the lessons in those steps. Some things, such as __equations__, and __tclab functions__, you aren't required to learn but can be useful. If you wish to learn those, __tclab functions__ and __basic python equations__, are on __cheat sheets__ in seperate files. Other general python info, such as equations, can be found online.)\n",
3030
"\n",
31-
"*Installation of TCLab is on the Functions Lesson, number 6. Or in the file, Useful For TCLab*"
31+
"*Installation of TCLab is on the Functions Lesson, number 5. Or in the file, Useful For TCLab*"
3232
]
3333
}
3434
],

05. Objects.ipynb

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,39 @@
2525
"metadata": {},
2626
"source": [
2727
"### Install Temperature Control Lab\n",
28-
"This code installs a program that will let you use your Temperature Control Kit."
28+
"This code installs a program that will let you use your Temperature Control Kit. Run the program to install TCLab. If installing TCLab is not working for you and the connection test below isn't working, try going [here](https://apmonitor.com/pdc/index.php/Main/ArduinoSetup) for additional instruction.\n",
29+
"\n",
30+
"(If you want to run the program with admin privileges, delete the code ```--user``` in lines 5 and 6)"
2931
]
3032
},
3133
{
3234
"cell_type": "code",
33-
"execution_count": 1,
35+
"execution_count": 6,
3436
"metadata": {},
3537
"outputs": [],
3638
"source": [
3739
"# install tclab\n",
3840
"try:\n",
3941
" import tclab\n",
4042
"except:\n",
41-
" !pip install --user pyserial # Needed to communicate through usb port\n",
42-
" !pip install --user tclab # The --user is put in for accounts without admin privileges \n",
43+
" # Needed to communicate through usb port\n",
44+
" !pip install --user pyserial\n",
45+
" # The --user is put in for accounts without admin privileges\n",
46+
" !pip install --user tclab \n",
47+
" # restart kernel if this doesn't import\n",
4348
" import tclab"
4449
]
4550
},
4651
{
4752
"cell_type": "markdown",
4853
"metadata": {},
4954
"source": [
50-
"This object is what allows you to connect with the kit, make it do things. In the next lesson we will go over the basics of what this temperture control kit can really do. Now try running and creating the object from above. Now if tclab is installed and imported, it should connect. Don't worry if this is confusing, all of it will be explained, next lesson."
55+
"This object is what allows you to connect with the kit, make it do things. In the next lesson we will go over the basics of what this temperture control kit can really do. Now try running and creating the object from below. Now if tclab is installed and imported, it should connect, tell you additional information, then disconnect. Don't worry if this is confusing, all of it will be explained, next lesson."
5156
]
5257
},
5358
{
5459
"cell_type": "code",
55-
"execution_count": 1,
60+
"execution_count": 4,
5661
"metadata": {},
5762
"outputs": [
5863
{

06. Functions.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"```lab.LED()``` This function will set the light, that is labeled __Hot__, on your tclab turn on at a certain brightness. If you want the light brightest you would use ```lab.LED(100)``` and all the way off ```lab.LED(0)```.\n",
109109
"\n",
110110
"### Heaters\n",
111-
"```lab.Q1()``` or ```lab.Q2()``` will set the power percentage of heater one or two. Same as the the ```LED``` function, ```Q1``` is set highest at ```lab.Q1(100)``` and off at ```lab.Q2(0)```.\n",
111+
"```lab.Q1()``` or ```lab.Q2()``` will set the power percentage of heater one or two. Same as the ```LED``` function, ```Q1``` is set highest at ```lab.Q1(100)``` and off at ```lab.Q1(0)```. The other heater works the same way, ```Q2``` is set highest at ```lab.Q2(100)``` and off at ```lab.Q2(0)```\n",
112112
"\n",
113113
"### Temperture Readers\n",
114114
"```lab.T1()``` or ```lab.T2()``` gives the current reading of the heater it corresponds to. It will give the values in __Celcius__.\n",
@@ -147,9 +147,9 @@
147147
"cell_type": "markdown",
148148
"metadata": {},
149149
"source": [
150-
"Use heater one, ```Q1```, at 40 percent and heater two, ```Q2```, at 80 percent. Use ```print()``` to record the tempertures with ```T1``` and ```T2``` after 10 seconds. Make sure to disconnect the heaters after you record the tempertures. Use the LED activity and the discriptions above if you don't remember some of the functions. \n",
150+
"Use heater one, ```Q1```, at 40 percent and heater two, ```Q2```, at 80 percent. Use ```print()``` to record the tempertures with ```T1``` and ```T2``` after 10 seconds, with ```time.sleep()```. Make sure to disconnect the heaters after you record the tempertures. Use the LED activity and the discriptions above if you don't remember some of the functions. \n",
151151
"\n",
152-
"(If the heaters don't turn off because of a bug in the code, unplug the cables connected to the lab)"
152+
"(If the heaters don't turn off because of a bug in the code, unplug the cables connected to the lab to stop heat up)"
153153
]
154154
},
155155
{

Useful For TCLab.ipynb

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616
"```lab.Q1()``` and ```lab.Q2()``` Percentage of power to heaters\n",
1717
"\n",
1818
"#### Temperture Readers\n",
19-
"```lab.T1``` and ```lab.T2``` Value of current heater tempertures"
19+
"```lab.T1``` and ```lab.T2``` Value of current heater tempertures\n",
20+
"\n",
21+
"_(All these functions are gone through in depth in lesson 6)_"
22+
]
23+
},
24+
{
25+
"cell_type": "markdown",
26+
"metadata": {},
27+
"source": [
28+
"### How to Use Programs Below\n",
29+
"Use the symbol to run the needed cell, left of the program."
2030
]
2131
},
2232
{
@@ -37,8 +47,11 @@
3747
"try:\n",
3848
" import tclab\n",
3949
"except:\n",
40-
" !pip install --user pyserial # Needed to communicate through usb port\n",
41-
" !pip install --user tclab\n",
50+
" # Needed to communicate through usb port\n",
51+
" !pip install --user pyserial\n",
52+
" # The --user is put in for accounts without admin privileges\n",
53+
" !pip install --user tclab \n",
54+
" # restart kernel if this doesn't import\n",
4255
" import tclab"
4356
]
4457
},

0 commit comments

Comments
 (0)