3aadc8d2596a71d744053faca63326131bd2f3ab
[challenge-bot] / curriculum / challenge-bot.scm
1 ;; tldr; AGPLv3+
2 ;; copyright info at bottom
3
4 (document
5 :title [challenge-bot]
6 (chapter
7 :title [mechanical]
8 (section
9 :title [arduino to deck]
10 (p [let's attach the arduino to the deck.])
11 (subsection
12 :title [required materials]
13 (p [you will need the things in this picture.
14 ,(figure :legend "arduino to deck / required materials"
15 (image :file "arduino-to-deck/0-required-materials.png"))
16 ,(itemize
17 (item [medical kit with bandages])
18 (item [safety goggles])
19 (item [drill bit \(we will determine size in a moment\)])
20 (item [drill])
21 (item [alan wrench])
22 (item [wood block])
23 (item [arduino])
24 (item [#6-32x3/8\", four of them]))]))
25 (subsection
26 :title [first hole]
27 (subsubsection
28 :title [choosing drill bit]
29 (p [choosing the right drill bit depends on what job you are doing.
30 right now, we are making holes for screws to hold the
31 arduino to the deck.
32 this means the hole needs to be big enough for the
33 screw body to fit through.
34 we want the screw to stay put once it's in place.
35 we also want the drill bit to be smaller than the
36 diameter of the thread.
37 the screw was chosen so that the hole on the arduino
38 was bigger than the body and smaller than the thread.
39 we will choose the biggest drill bit that fits through
40 the hole on the arduino.])
41 (p [here's a cross section of a screw in the deck]
42 (figure :legend "screw cross section"
43 (image :file
44 "arduino-to-deck/screw-cross-section.png"))))
45 (subsubsection
46 :title [inserting drill bit]
47 (p (figure :legend "arduino to deck / insert bit"
48 (image :file "arduino-to-deck/1-insert-bit.png"))
49 [insert the drill bit into the teeth of the drill.
50 insert it far enough that the teeth will clamp on the
51 smooth part of the bit when they are tightened.])
52 (p (figure
53 :legend "arduino to deck / twist tighten drill teeth"
54 (image :file "arduino-to-deck/2-twist-tighten-drill-teeth.png"))
55 [while holding the drill bit, twist end of the drill to tighten
56 the teeth.
57 make sure that the teeth end up gripping the flat part of
58 the drill bit.]))
59 (subsubsection
60 :title [holding drill]
61 (p [hold the drill with one hand on the handle and trigger.
62 put the other hand on the orange nozzle, before the
63 black spinning part.]))
64 (subsubsection
65 :title [arduino placement]
66 (p [the arduino should be placed as shown in this picture.]
67 (figure :legend "arduino to deck / place arduino"
68 (image :file "arduino-to-deck/3-place-arduino.png")))
69 (p [here's a closeup]
70 (figure :legend "arduino to deck / place arduino closeup"
71 (image :file
72 "arduino-to-deck/4-place-arduino-closeup.png"))
73 [the picture above shows where to place the arduino on the deck.
74 the arduino should line up with the holes on the deck.
75 this alignment line is highlighted in pink.
76 on the arduino, there's a hole on the top left, between the
77 orange reset button and black headers.
78 the green circle shows where the hole is.
79 the blue box encloses the arduino hole and two deck holes.
80 place the arduino hole mid-way between the two
81 deck holes.]))
82 (subsubsection
83 :title [drilling]))
84 (subsection
85 :title [first screw]
86 (subsubsection
87 :title [fastening arduino to deck using #6-32x3/8\" screw]
88 (p [the "#6" part of "#6-32x3/8\"" is how big around the bolt is.
89 it is related to wire gauge.
90 bigger numbers mean larger screw.
91 smaller numbers means smaller screws.]
92 (figure :legend "arduino to deck / #6-32 screw"
93 (image :file
94 "arduino-to-deck/6-32-screw.png")))
95 (p [check
96 ,(itemize
97 (item
98 [in the motor assembly, there are #4-40x1.25\" screws.
99 are those fatter, thinner, or the same thickness as the
100 #6-32x3/8\" screws?]))])
101 (p [the "32" part is a measurement of how close the threads are to
102 each other.
103 this is related to the angle of the thread, which is also
104 called pitch.
105 it is a count of how many times the thread wraps around one
106 inch of the screw body.])
107 (p [the head is the flat part where some tool, like the alan
108 wrench, can exert force to spin the screw.])
109 (p [check
110 ,(itemize
111 (item [how many times will the thread wrap around one inch of
112 the screw body?])
113 (item [what about 2 inches?
114 how many times will the thread wrap around two
115 inches of the screw body?]))]))
116 (subsubsection
117 :title [fasten the arduino board to the deck]
118 (p [push the 6-32 screw into the deck from the underside and at the
119 same time, spin the 6-32 screw clockwise while looking
120 down on its head.
121 twist until the bottom of the screw is
122 about to stick out on the top side of the deck.])
123 (p [hold the arduino board flat to the deck and line up the arduino
124 hole so the screw can come up through it.
125 continue tightening the screw into the deck, spinning the same
126 direction as before.
127 tighten until the screw head touches the deck.
128 do not continue tightening after that.])
129 (p [the arduino should still be flat against the deck still, just
130 as it was before tightening the screw.]))
131 (subsubsection
132 :title [assessment]
133 (p [does the arduino stay with the deck when the deck moves?
134 can the arduino board still rotate a few degrees?
135 warning, if you rotate the arduino board too much, you
136 will unscrew it from the deck and you'll have to screw it
137 back in.
138 rotating a few degrees should be ok.]))
139 (subsubsection
140 :title [arduino board move relative to deck]
141 (p [without any screws, the arduino board can move independently of
142 the deck.])
143 (p [with the first screw, the arduino can rotate around one point
144 on the deck.])))
145 (subsection
146 :title [second hole and screw])
147 (subsection
148 :title [third and fourth hole and screw]))
149 (section
150 :title [breadboard])
151 (section
152 :title [battery packs]
153 (subsection
154 :title [leads])
155 (subsection
156 :title [deck attachment]))
157 (section
158 :title [motors]
159 (subsection
160 :title [leads])
161 (subsection
162 :title [mount])
163 (subsection
164 :title [deck attachment]))
165 (section
166 :title [wheels]
167 (subsection
168 :title [tread])
169 (subsection
170 :title [motor]))
171 (section
172 :title [caster]
173 (subsection
174 :title [deck placement]))
175 (section
176 :title [sonars]
177 (subsection
178 :title [deck placement])))
179 (chapter
180 :title [wiring and software]
181 (section
182 :title [serial]
183 (subsection
184 :title [software on computer]
185 (subsubsection
186 :title [arduino])
187 (subsubsection
188 :title [fritzing]))
189 (subsection
190 :title [attach arduino and computer via cable])
191 (subsection
192 :title [debugging common connection problems])
193 (subsection
194 :title [arduino reset button]))
195 (section
196 :title [left sonar]
197 (subsection
198 :title [breadboard connectivity])
199 (subsection
200 :title [cable])
201 (subsection
202 :title [arduino headers])
203 (subsection
204 :title [sound cm per microsecond at sea level]))
205 (section
206 :title [both sonars]
207 (subsection
208 :title [breadboard power rail]
209 (p [power rail can provide power to more than one device.])))
210 (section
211 :title [left motor]
212 (subsection
213 :title [arduino digital output])
214 (subsection
215 :title [quad half h bridge, aka motor controller])
216 (subsection
217 :title [motor battery]))
218 (section
219 :title [both motors]
220 (subsection
221 :title [analogWrite]))
222 (section
223 :title [untethered]
224 (subsection
225 :title [arduino battery])
226 (subsection
227 :title [off and on functions]))
228 (section
229 :title [follow]
230 (subsection
231 :title [same wiring as untethered])
232 (subsection
233 :title [set motor])
234 (subsection
235 :title [go])
236 (subsection
237 :title [determining speed]))
238 (section
239 :title [stay on table]
240 (subsection
241 :title [stop])
242 (subsection
243 :title [backup])
244 (subsection
245 :title [turn around]))))
246
247 ;; Copyright 2016 daniel watson
248
249 ;; This file is part of challenge-bot.
250
251 ;; challenge-bot is free software: you can redistribute it and/or modify
252 ;; it under the terms of the GNU Affero General Public License as
253 ;; published by the Free Software Foundation, either version 3 of the
254 ;; License, or (at your option) any later version.
255
256 ;; challenge-bot is distributed in the hope that it will be useful,
257 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
258 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
259 ;; GNU Affero General Public License for more details.
260
261 ;; You should have received a copy of the GNU Affero General Public
262 ;; License along with challenge-bot. If not, see
263 ;; <http://www.gnu.org/licenses/>.