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