From: daniel watson Date: Tue, 14 Jun 2016 02:12:53 +0000 (-0700) Subject: curriculum -> guide, prepend 0- to arduino-to-deck X-Git-Url: http://challenge-bot.com/repos/?p=challenge-bot;a=commitdiff_plain;h=eef3ff811a491944642e3d9615337001b0ed8999 curriculum -> guide, prepend 0- to arduino-to-deck --- diff --git a/curriculum/arduino-to-deck/0-required-materials.png b/curriculum/arduino-to-deck/0-required-materials.png deleted file mode 100644 index 580e0df..0000000 Binary files a/curriculum/arduino-to-deck/0-required-materials.png and /dev/null differ diff --git a/curriculum/arduino-to-deck/1-insert-bit.png b/curriculum/arduino-to-deck/1-insert-bit.png deleted file mode 100644 index 1e2bd69..0000000 Binary files a/curriculum/arduino-to-deck/1-insert-bit.png and /dev/null differ diff --git a/curriculum/arduino-to-deck/2-twist-tighten-drill-teeth.png b/curriculum/arduino-to-deck/2-twist-tighten-drill-teeth.png deleted file mode 100644 index 2da08be..0000000 Binary files a/curriculum/arduino-to-deck/2-twist-tighten-drill-teeth.png and /dev/null differ diff --git a/curriculum/arduino-to-deck/4-place-arduino-closeup.svg b/curriculum/arduino-to-deck/4-place-arduino-closeup.svg deleted file mode 100644 index 15f2db0..0000000 --- a/curriculum/arduino-to-deck/4-place-arduino-closeup.svg +++ /dev/null @@ -1,6577 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/curriculum/arduino-to-deck/6-32-screw.svg b/curriculum/arduino-to-deck/6-32-screw.svg deleted file mode 100644 index bf517c1..0000000 --- a/curriculum/arduino-to-deck/6-32-screw.svg +++ /dev/null @@ -1,392 +0,0 @@ - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - head - body"#6" = 6 gauge = 0.138 inches diameter - thread - - #6-32x3/8" screw - - - "32"threadwrapsper inchalongthe body - 0 - 1 - 2 - 3 - - 4 - - - - - 4 thread wrapsat 32 wrapsper inch=>4/32 ofan inch,=>1/8" length - representation, not 100% accurate - - diff --git a/curriculum/arduino-to-deck/keep-holes-far-apart.svg b/curriculum/arduino-to-deck/keep-holes-far-apart.svg deleted file mode 100644 index 5fc3a34..0000000 --- a/curriculum/arduino-to-deck/keep-holes-far-apart.svg +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - same verticaldistance - - - - - angle A isbigger than angle B - A - B - - - holes that are far apartminimize rotation - - - - diff --git a/curriculum/arduino-to-deck/screw-cross-section.svg b/curriculum/arduino-to-deck/screw-cross-section.svg deleted file mode 100644 index c15b685..0000000 --- a/curriculum/arduino-to-deck/screw-cross-section.svg +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - head - body - thread - - screw cross section - - - - - - - - deck - deck - - diff --git a/curriculum/autobuild.bash b/curriculum/autobuild.bash deleted file mode 100755 index d5355ab..0000000 --- a/curriculum/autobuild.bash +++ /dev/null @@ -1,40 +0,0 @@ -#! /usr/bin/env bash -# tldr; AGPLv3+ -# copyright info at bottom - -# build directory when any file is modified -inotifywait \ - --quiet \ - --recursive \ - --monitor \ - --event close_write \ - --format %f \ - . | \ - while IFS= read -r file; do - make - done - -# goes great with -# https://addons.mozilla.org/en-US/firefox/addon/auto-reload/ -# url regex: -# challenge-bot\.html -# local files -# $CWD/challenge-bot.html - -# Copyright 2016 daniel watson - -# This file is part of challenge-bot. - -# challenge-bot is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. - -# challenge-bot is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. - -# You should have received a copy of the GNU Affero General Public -# License along with challenge-bot. If not, see -# . diff --git a/curriculum/challenge-bot.scm b/curriculum/challenge-bot.scm deleted file mode 100644 index 710051d..0000000 --- a/curriculum/challenge-bot.scm +++ /dev/null @@ -1,402 +0,0 @@ -;; tldr; AGPLv3+ -;; copyright info at bottom - -(document - :title [challenge-bot] - (chapter - :title [mechanical] - (p [let's build your robot!]) - (section - :title [arduino to deck] - (p [let's attach the arduino to the deck.]) - (subsection - :title [required materials] - (p [you will need the things in this picture. - ,(figure :legend "arduino to deck / required materials" - (image :file "arduino-to-deck/0-required-materials.png")) - ,(itemize - (item [medical kit with bandages]) - (item [safety goggles]) - (item [drill bit \(we will determine size in a moment\)]) - (item [drill]) - (item [alan wrench]) - (item [wood block]) - (item [arduino]) - (item [#6-32x3/8\", four of them]) - (item [robot deck, the white thing with a grid of holes1]))])) - (subsection - :title [first hole] - (subsubsection - :title [choosing drill bit] - (p [the arduino comes with holes in it already, so we will make - some choices around those holes. - choosing the right drill bit depends on what job you are - doing. - right now, we are making holes for screws to hold the - arduino to the deck. - there are two constraints between the hole and screw. - each hole needs to be big enough for the screw body to fit - through it. - the holes also need to be smaller than the screw's thread. - since there are holes on the arduino already, the screw was - chosen to match it. - the screw was chosen so that the hole on the arduino was - bigger than the screw body and smaller than its thread. - we will choose the biggest drill bit that fits through the - hole on the arduino, then use that to drill holes in the - deck.]) - (p [here's a cross section of a screw in the deck] - (figure :legend "screw cross section" - (image :file - "arduino-to-deck/screw-cross-section.png"))) - (p [check - ,(itemize - (item - [what would happen if the drill bit were larger than the - screw thread?]) - (item - [what would happen if the drill bit were smaller than the - screw body?]))])) - (subsubsection - :title [inserting drill bit] - (p (figure :legend "arduino to deck / insert bit" - (image :file "arduino-to-deck/1-insert-bit.png")) - [insert the drill bit into the teeth of the drill. - insert it far enough that the teeth will clamp on the - smooth part of the bit when they are tightened.]) - (p (figure - :legend "arduino to deck / twist tighten drill teeth" - (image :file "arduino-to-deck/2-twist-tighten-drill-teeth.png")) - [while holding the drill bit, twist end of the drill to tighten - the teeth. - make sure that the teeth end up gripping the flat part of - the drill bit.]) - (p [check - ,(itemize - (item - [where should the teeth clamp down on the drill bit?]) - (item - [what would happen if the teeth tightened on the recessed - part of the drill bit?]))])) - (subsubsection - :title [holding drill] - (p [hold the drill with one hand on the handle and trigger. - put the other hand on the orange nozzle, before the - black spinning part.])) - (subsubsection - :title [arduino placement] - (p [the arduino should be placed as shown in this picture.] - (figure :legend "arduino to deck / place arduino" - (image :file "arduino-to-deck/3-place-arduino.png"))) - (p [here's a closeup] - (figure :legend "arduino to deck / place arduino closeup" - (image :file - "arduino-to-deck/4-place-arduino-closeup.png")) - [the picture above shows where to place the arduino on the deck. - the arduino should line up with the holes on the deck. - this alignment line is highlighted in pink. - on the arduino, there's a hole on the top left, between the - orange reset button and black headers. - the green circle shows where the hole is. - the blue box encloses the arduino hole and two deck holes. - place the arduino hole mid-way between the two - deck holes.]) - (p [check - ,(itemize - (item - [should the arduino be upside-down?]) - (item - [what should the upper side of the arduino align with?]) - (item - [why not place the arduino up along the left side of the - robot?]))])) - (subsubsection - :title [drilling practice] - (p [strength check] - (itemize - (item [put on safety goggles]) - (item [unplug drill]) - (item [hold drill in one hand]) - (item [point drill at the ground]) - (item [point drill at the wall]))) - (p [steps for drilling into wood block] - (itemize - (item [plug in the drill]) - (item [place the drill bit in position]) - (item [bring the drill up to full speed, and keep it at full - speed while lowering and raising the drill]) - (item [push down until the drill bit has passed through an inch - of the wood block]) - (item [keep the drill at full speed]) - (item [stop before the drill smashes into the wood block]) - (item [keep the drill at full speed by holding the trigger]) - (item [bring the drill straight back up]) - (item [hold the trigger down to keep the drill at full speed]) - (item [once the drill is back out of the hole, let go of the - trigger]))) - (p [check - ,(itemize - (item - [should the drill be at full speed while the drill bit is - going down into the wood and coming back up?]) - (item - [how do you keep the drill at full speed?]) - (item - [what would happen if the drill bit were not at full - speed?]) - (item - [what would happen if the drill were twisted sideways while - the drill bit were in the wood?]))])) - (subsubsection - :title [drilling the first screw hole] - (itemize - (item [place the drill bit in position]) - (item [bring the drill up to full speed, and keep it full speed]) - (item [push down until the drill bit has passed through the - deck]) - (item [keep the drill at full speed]) - (item [stop before the drill smashes into the arduino]) - (item [keep the drill at full speed by holding the trigger]) - (item [bring the drill straight back up]) - (item [hold the trigger down to keep the drill at full speed]) - (item [once the drill is back out of the hole, let go of the - trigger])) - (p [check - ,(itemize - (item - [should the drill be at full speed while the drill bit is - going down into the wood and coming back up?]) - (item - [what would happen if the drill bit were not at full - speed?]) - (item - [how do you keep the drill at full speed?]))]))) - (subsection - :title [first screw] - (subsubsection - :title [fastening arduino to deck using #6-32x3/8\" screw] - (p [the "#6" part of "#6-32x3/8\"" is how big around the bolt is. - it is related to wire gauge. - bigger numbers mean larger screws. - smaller numbers means smaller screws.] - (figure :legend "arduino to deck / #6-32 screw" - (image :file - "arduino-to-deck/6-32-screw.png"))) - (p [check - ,(itemize - (item - [in the motor assembly, there are #4-40x1.25\" screws. - are those fatter, thinner, or the same thickness as the - #6-32x3/8\" screws?]))]) - (p [the "32" part of "#6-32x3/8\"" is a measurement of how close - the threads are to each other. - this is related to the angle of the thread, which is also - called pitch. - it is a count of how many times the thread wraps around one - inch of the screw body.]) - (p [the head is the flat part where some tool, like the alan - wrench, can exert force to spin the screw.]) - (p [check - ,(itemize - (item [how many times will the thread wrap around one inch of - the screw body?]) - (item [what about 2 inches? - how many times will the thread wrap around two - inches of the screw body?]) - (item [where can a tool exert turning force on - the screw?]))])) - (subsubsection - :title [fasten the arduino board to the deck] - (p [first we'll put the screw into the deck just enough so the deck - holds it in place. - then we will hold the arduino up to the screw and finish - tightening the screw down. - with the screw partially in, we do not have hold it as - rigidly while we are also holding the arduino and - the deck.]) - (p [push the #6-32 screw into the deck from the underside. - the underside is the brown side. - at the same time, spin the 6-32 screw so it rotates - clockwise while looking down on its head. - twist until the tip of the screw is about to stick out on - the top side of the deck.]) - (p [hold the arduino board flat to the deck and line up the arduino - hole so the screw can come up through it. - continue tightening the screw into the deck, spinning the same - direction as before. - tighten until the screw head touches the deck. - do not continue tightening after that.]) - (p [the arduino should still be flat against the deck still, just - as it was before tightening the screw.]) - (p [check - ,(itemize - (item [why do we insert the first screw partially before - holding up the arduino?]) - (item [which side of the deck is the top side?]))])) - (subsubsection - :title [assessment of the first screw] - (itemize - (item [,(bold [warning]), if you rotate the arduino board too - much,you will unscrew it from the deck and you'll have to - screw it back in. - rotating a few degrees should be ok.]) - (item [does the arduino stay with the deck when the deck moves?]) - (item [can the arduino board still rotate a few degrees?])))) - (subsection - :title [second hole and screw] - (subsubsection - :title [arduino board move relative to deck] - (p [without any screws, the arduino board can move independently of - the deck. - it can translate and rotate freely. - with the first screw, the arduino can rotate around one - point on the deck and can no longer translate much.]) - (p [the second screw limits rotation a lot. - it also makes translation even more difficult. - it might even be too small to be detectable by directly - looking at it.]) - (p [to choose where the second hole and screw should go, we should - keep in mind that the goal is to attach the deck to the - arduino. - this means minimizing rotation and translation. - the picture below shows that the second hole should be as - far as possible from the first hole, since that minimizes - rotation.] - (figure :legend "arduino to deck / keep holes far apart" - (image :file "arduino-to-deck/keep-holes-far-apart.png")))) - (subsubsection - :title [drilling and attaching second screw] - (p [to drill the second hole, follow the same steps as drilling the - first hole. - hold the arduino down as before, and drill through the hole - furthest away from the first hole. - then insert and tighten the screw as before.]))) - (subsection - :title [third and fourth hole and screw] - (p [even though the arduino is pretty well attached with just 2 - screws, we will add a third and fourth. - this gives practice drilling and tightening screws. - it also keeps the arduino fixed even more rigidly.])) - (subsection - :title [assessment of arduino deck attachment] - (itemize - (item [you should now be able to grab the deck and shake it. - the arduino should stay firmly in place while you do.]) - (item [the arduino should be close to but not touching an edge.]) - (item [there should be no warping on the arduino. - this could happen if the screws are too tight.])))) - (section - :title [breadboard]) - (section - :title [battery packs] - (subsection - :title [leads]) - (subsection - :title [deck attachment])) - (section - :title [motors] - (subsection - :title [leads]) - (subsection - :title [mount]) - (subsection - :title [deck attachment])) - (section - :title [wheels] - (subsection - :title [tread]) - (subsection - :title [motor])) - (section - :title [caster] - (subsection - :title [deck placement])) - (section - :title [sonars] - (subsection - :title [deck placement]))) - (chapter - :title [wiring and software] - (section - :title [serial] - (subsection - :title [software on computer] - (subsubsection - :title [arduino]) - (subsubsection - :title [fritzing])) - (subsection - :title [attach arduino and computer via cable]) - (subsection - :title [debugging common connection problems]) - (subsection - :title [arduino reset button])) - (section - :title [left sonar] - (subsection - :title [breadboard connectivity]) - (subsection - :title [cable]) - (subsection - :title [arduino headers]) - (subsection - :title [sound cm per microsecond at sea level])) - (section - :title [both sonars] - (subsection - :title [breadboard power rail] - (p [power rail can provide power to more than one device.]))) - (section - :title [left motor] - (subsection - :title [arduino digital output]) - (subsection - :title [quad half h bridge, aka motor controller]) - (subsection - :title [motor battery])) - (section - :title [both motors] - (subsection - :title [analogWrite])) - (section - :title [untethered] - (subsection - :title [arduino battery]) - (subsection - :title [off and on functions])) - (section - :title [follow] - (subsection - :title [same wiring as untethered]) - (subsection - :title [set motor]) - (subsection - :title [go]) - (subsection - :title [determining speed])) - (section - :title [stay on table] - (subsection - :title [stop]) - (subsection - :title [backup]) - (subsection - :title [turn around])))) - -;; Copyright 2016 daniel watson - -;; This file is part of challenge-bot. - -;; challenge-bot is free software: you can redistribute it and/or modify -;; it under the terms of the GNU Affero General Public License as -;; published by the Free Software Foundation, either version 3 of the -;; License, or (at your option) any later version. - -;; challenge-bot is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU Affero General Public License for more details. - -;; You should have received a copy of the GNU Affero General Public -;; License along with challenge-bot. If not, see -;; . diff --git a/curriculum/makefile b/curriculum/makefile deleted file mode 100644 index 08764ae..0000000 --- a/curriculum/makefile +++ /dev/null @@ -1,98 +0,0 @@ -all:challenge-bot.html - -.PHONY: autobuild -autobuild: - ./autobuild.bash - -square.png: square.scad makefile - @openscad \ - --render \ - -o square.png \ - --camera=1.27,1.57,0.01,0,0,0,9.05 \ - --imgsize=931,634 \ - square.scad - -square1.png: square1.scad makefile - @openscad \ - --render \ - -o square1.png \ - --camera=1.27,1.57,0.01,0,0,0,9.05 \ - --imgsize=931,634 \ - square1.scad - -square2.png: square2.scad makefile - @openscad \ - --render \ - -o square2.png \ - --camera=1.27,1.57,0.01,0,0,0,9.05 \ - --imgsize=931,634 \ - square2.scad - -square3.png: square3.scad makefile - @openscad \ - --render \ - -o square3.png \ - --camera=1.27,1.57,0.01,0,0,0,9.05 \ - --imgsize=931,634 \ - square3.scad - -square.html: square.scm square.png square1.png square2.png square3.png makefile - @skribilo square.scm > square.html - -translate.png: translate.scad makefile - @openscad \ - --render \ - -o translate.png \ - --camera=1.27,1.57,0.01,0,0,0,9.05 \ - --imgsize=931,634 \ - translate.scad - -translate01.png: translate01.scad makefile - @openscad \ - --render \ - -o translate01.png \ - --camera=1.27,1.57,0.01,0,0,0,9.05 \ - --imgsize=931,634 \ - translate01.scad - -translate10.png: translate10.scad makefile - @openscad \ - --render \ - -o translate10.png \ - --camera=1.27,1.57,0.01,0,0,0,9.05 \ - --imgsize=931,634 \ - translate10.scad - -translate.html: translate.scm \ - translate.png \ - translate10.png \ - translate01.png \ - makefile - @skribilo translate.scm > translate.html - -%.png:%.svg makefile - @inkscape \ - --export-png $@ \ - --file $< \ - > /dev/null - -challenge-bot.html: challenge-bot.scm \ - arduino-to-deck/screw-cross-section.png \ - arduino-to-deck/6-32-screw.png \ - arduino-to-deck/4-place-arduino-closeup.png \ - arduino-to-deck/keep-holes-far-apart.png \ - makefile - @skribilo $< > $@ - -clean: - @rm -f \ - square.png \ - square1.png \ - square2.png \ - square3.png \ - square.html \ - translate.png \ - translate01.png \ - translate10.png \ - translate.html \ - challenge-bot.html diff --git a/curriculum/notes.org b/curriculum/notes.org deleted file mode 100644 index bc2878f..0000000 --- a/curriculum/notes.org +++ /dev/null @@ -1,4 +0,0 @@ -* TODO change code for left motor to only use digitalWrite -* TODO take pics of how to hold drill -* TODO take pics of 6-32 to show what "6" and "32" mean -* TODO figure out what exactly "32" measures diff --git a/curriculum/square.scad b/curriculum/square.scad deleted file mode 100644 index c8ea7fd..0000000 --- a/curriculum/square.scad +++ /dev/null @@ -1,21 +0,0 @@ -// tldr; AGPLv3+ -// copyright info at bottom -square(); -/* -Copyright 2016 daniel watson - -This file is part of challenge-bot. - -challenge-bot is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -challenge-bot is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with challenge-bot. If not, see . -*/ diff --git a/curriculum/square.scm b/curriculum/square.scm deleted file mode 100644 index 7d08b9a..0000000 --- a/curriculum/square.scm +++ /dev/null @@ -1,71 +0,0 @@ -;; tldr; AGPLv3+ -;; copyright info at bottom -(use-modules (skribilo source c)) - -(document - :title [square] - (chapter - :title (source :language c [square()\;]) - :number #f - (p [here's the output of ,(prog (source :language c [square()\;]))]) - (figure - :legend "square();" - (image :file "square.png" :height 500)) - (p [openscad draws a square for the code - ,(source :language c [square()\;]).]) - (p [there are a couple other things worth noting here. - square is followed by an open and close parenthesis - ,(source :language c [()]), and then by a semicolon - ,(source :language c [\;])])) - (chapter - :title [square(1)\;] - :number #f - (p [here's the output of ,(source :language c [square(1)\;])]) - (figure - :legend "square(1);" - (image :file "square1.png" :height 500)) - (p [note that it's identical to the - ,(source :language c [square()\;]) output. this is because - by default, openscad guesses a value of 1 whenever a value - is left unspecified.])) - (chapter - :title [square(2)\;] - :number #f - (p [here's the output of ,(source :language c [square(2)\;])]) - (figure - :legend "square(2);" - (image :file "square2.png" :height 500)) - (p [note that it is twice the size of the prior 2 examples.])) - (chapter - :title [square(3)\;] - :number #f - (p [here's the output of ,(source :language c [square(3)\;])]) - (p [how big do you expect this square to be?]) - (figure - :legend "square(3);" - (image :file "square3.png" :height 500))) - (chapter - :title [quiz on square 1 2 3] - :number #f - (section - :title [questions for simplest square] - (p [what's the code for the simplest square?]) - (p [where is the bottom right corner of the simplest square?])))) - -;; Copyright 2016 daniel watson - -;; This file is part of challenge-bot. - -;; challenge-bot is free software: you can redistribute it and/or modify -;; it under the terms of the GNU Affero General Public License as -;; published by the Free Software Foundation, either version 3 of the -;; License, or (at your option) any later version. - -;; challenge-bot is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU Affero General Public License for more details. - -;; You should have received a copy of the GNU Affero General Public -;; License along with challenge-bot. If not, see -;; . diff --git a/curriculum/square1.scad b/curriculum/square1.scad deleted file mode 100644 index 8c0bb87..0000000 --- a/curriculum/square1.scad +++ /dev/null @@ -1,21 +0,0 @@ -// tldr; AGPLv3+ -// copyright info at bottom -square(1); -/* -Copyright 2016 daniel watson - -This file is part of challenge-bot. - -challenge-bot is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -challenge-bot is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with challenge-bot. If not, see . -*/ diff --git a/curriculum/square2.scad b/curriculum/square2.scad deleted file mode 100644 index 25c47c6..0000000 --- a/curriculum/square2.scad +++ /dev/null @@ -1,21 +0,0 @@ -// tldr; AGPLv3+ -// copyright info at bottom -square(2); -/* -Copyright 2016 daniel watson - -This file is part of challenge-bot. - -challenge-bot is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -challenge-bot is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with challenge-bot. If not, see . -*/ diff --git a/curriculum/square3.scad b/curriculum/square3.scad deleted file mode 100644 index daa2fa2..0000000 --- a/curriculum/square3.scad +++ /dev/null @@ -1,21 +0,0 @@ -// tldr; AGPLv3+ -// copyright info at bottom -square(3); -/* -Copyright 2016 daniel watson - -This file is part of challenge-bot. - -challenge-bot is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -challenge-bot is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with challenge-bot. If not, see . -*/ diff --git a/curriculum/translate.scad b/curriculum/translate.scad deleted file mode 100644 index 40e5bc0..0000000 --- a/curriculum/translate.scad +++ /dev/null @@ -1,23 +0,0 @@ -// tldr; AGPLv3+ -// copyright info at bottom - -translate([]){square();} - -/* -Copyright 2016 daniel watson - -This file is part of challenge-bot. - -challenge-bot is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -challenge-bot is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with challenge-bot. If not, see . -*/ diff --git a/curriculum/translate.scm b/curriculum/translate.scm deleted file mode 100644 index feaad89..0000000 --- a/curriculum/translate.scm +++ /dev/null @@ -1,42 +0,0 @@ -;; tldr; AGPLv3+ -;; copyright info at bottom -(use-modules (skribilo source c)) - -(document - :title [translate] - (chapter - :title (source :language c [translate(\[\]){square\;}]) - :number #f - (p [here's the output of - ,(prog (source :language c [translate(\[0, 0\]){square()\;}]))]) - (figure - :legend "translate([0, 0]){square();}" - (image :file "translate.png" :height 500)) - (p [here's the output of - ,(prog (source :language c [translate(\[0, 1\]){square()\;}]))]) - (figure - :legend "translate([0, 1]){square();}" - (image :file "translate01.png" :height 500)) - (p [here's the output of - ,(prog (source :language c [translate(\[1, 0\]){square()\;}]))]) - (figure - :legend "translate([1, 0]){square();}" - (image :file "translate10.png" :height 500)))) - -;; Copyright 2016 daniel watson - -;; This file is part of challenge-bot. - -;; challenge-bot is free software: you can redistribute it and/or modify -;; it under the terms of the GNU Affero General Public License as -;; published by the Free Software Foundation, either version 3 of the -;; License, or (at your option) any later version. - -;; challenge-bot is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU Affero General Public License for more details. - -;; You should have received a copy of the GNU Affero General Public -;; License along with challenge-bot. If not, see -;; . diff --git a/curriculum/translate01.scad b/curriculum/translate01.scad deleted file mode 100644 index 15a198e..0000000 --- a/curriculum/translate01.scad +++ /dev/null @@ -1,23 +0,0 @@ -// tldr; AGPLv3+ -// copyright info at bottom - -translate([0, 1]){square();} - -/* -Copyright 2016 daniel watson - -This file is part of challenge-bot. - -challenge-bot is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -challenge-bot is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with challenge-bot. If not, see . -*/ diff --git a/curriculum/translate10.scad b/curriculum/translate10.scad deleted file mode 100644 index e78e4e2..0000000 --- a/curriculum/translate10.scad +++ /dev/null @@ -1,23 +0,0 @@ -// tldr; AGPLv3+ -// copyright info at bottom - -translate([1, 0]){square();} - -/* -Copyright 2016 daniel watson - -This file is part of challenge-bot. - -challenge-bot is free software: you can redistribute it and/or modify -it under the terms of the GNU Affero General Public License as published -by the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -challenge-bot is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Affero General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with challenge-bot. If not, see . -*/ diff --git a/guide/0-arduino-to-deck/0-required-materials.png b/guide/0-arduino-to-deck/0-required-materials.png new file mode 100644 index 0000000..580e0df Binary files /dev/null and b/guide/0-arduino-to-deck/0-required-materials.png differ diff --git a/guide/0-arduino-to-deck/1-insert-bit.png b/guide/0-arduino-to-deck/1-insert-bit.png new file mode 100644 index 0000000..1e2bd69 Binary files /dev/null and b/guide/0-arduino-to-deck/1-insert-bit.png differ diff --git a/guide/0-arduino-to-deck/2-twist-tighten-drill-teeth.png b/guide/0-arduino-to-deck/2-twist-tighten-drill-teeth.png new file mode 100644 index 0000000..2da08be Binary files /dev/null and b/guide/0-arduino-to-deck/2-twist-tighten-drill-teeth.png differ diff --git a/guide/0-arduino-to-deck/3-place-arduino-closeup.svg b/guide/0-arduino-to-deck/3-place-arduino-closeup.svg new file mode 100644 index 0000000..15f2db0 --- /dev/null +++ b/guide/0-arduino-to-deck/3-place-arduino-closeup.svg @@ -0,0 +1,6577 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/guide/0-arduino-to-deck/6-32-screw.svg b/guide/0-arduino-to-deck/6-32-screw.svg new file mode 100644 index 0000000..bf517c1 --- /dev/null +++ b/guide/0-arduino-to-deck/6-32-screw.svg @@ -0,0 +1,392 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + head + body"#6" = 6 gauge = 0.138 inches diameter + thread + + #6-32x3/8" screw + + + "32"threadwrapsper inchalongthe body + 0 + 1 + 2 + 3 + + 4 + + + + + 4 thread wrapsat 32 wrapsper inch=>4/32 ofan inch,=>1/8" length + representation, not 100% accurate + + diff --git a/guide/0-arduino-to-deck/keep-holes-far-apart.svg b/guide/0-arduino-to-deck/keep-holes-far-apart.svg new file mode 100644 index 0000000..5fc3a34 --- /dev/null +++ b/guide/0-arduino-to-deck/keep-holes-far-apart.svg @@ -0,0 +1,379 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + same verticaldistance + + + + + angle A isbigger than angle B + A + B + + + holes that are far apartminimize rotation + + + + diff --git a/guide/0-arduino-to-deck/screw-cross-section.svg b/guide/0-arduino-to-deck/screw-cross-section.svg new file mode 100644 index 0000000..c15b685 --- /dev/null +++ b/guide/0-arduino-to-deck/screw-cross-section.svg @@ -0,0 +1,305 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + head + body + thread + + screw cross section + + + + + + + + deck + deck + + diff --git a/guide/autobuild.bash b/guide/autobuild.bash new file mode 100755 index 0000000..d5355ab --- /dev/null +++ b/guide/autobuild.bash @@ -0,0 +1,40 @@ +#! /usr/bin/env bash +# tldr; AGPLv3+ +# copyright info at bottom + +# build directory when any file is modified +inotifywait \ + --quiet \ + --recursive \ + --monitor \ + --event close_write \ + --format %f \ + . | \ + while IFS= read -r file; do + make + done + +# goes great with +# https://addons.mozilla.org/en-US/firefox/addon/auto-reload/ +# url regex: +# challenge-bot\.html +# local files +# $CWD/challenge-bot.html + +# Copyright 2016 daniel watson + +# This file is part of challenge-bot. + +# challenge-bot is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. + +# challenge-bot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. + +# You should have received a copy of the GNU Affero General Public +# License along with challenge-bot. If not, see +# . diff --git a/guide/challenge-bot.scm b/guide/challenge-bot.scm new file mode 100644 index 0000000..1d662c2 --- /dev/null +++ b/guide/challenge-bot.scm @@ -0,0 +1,406 @@ +;; tldr; AGPLv3+ +;; copyright info at bottom + +(document + :title [challenge-bot] + (chapter + :title [mechanical] + (p [let's build your robot!]) + (section + :title [arduino to deck] + (p [let's attach the arduino to the deck.]) + (subsection + :title [required materials] + (p [you will need the things in this picture. + ,(figure + :legend "arduino to deck / required materials" + (image :file + "0-arduino-to-deck/0-required-materials.png")) + ,(itemize + (item [medical kit with bandages]) + (item [safety goggles]) + (item [drill bit \(we will determine size in a moment\)]) + (item [drill]) + (item [alan wrench]) + (item [wood block]) + (item [arduino]) + (item [#6-32x3/8\", four of them]) + (item [robot deck, the white thing with a grid of holes1]))])) + (subsection + :title [first hole] + (subsubsection + :title [choosing drill bit] + (p [the arduino comes with holes in it already, so we will make + some choices around those holes. + choosing the right drill bit depends on what job you are + doing. + right now, we are making holes for screws to hold the + arduino to the deck. + there are two constraints between the hole and screw. + each hole needs to be big enough for the screw body to fit + through it. + the holes also need to be smaller than the screw's thread. + since there are holes on the arduino already, the screw was + chosen to match it. + the screw was chosen so that the hole on the arduino was + bigger than the screw body and smaller than its thread. + we will choose the biggest drill bit that fits through the + hole on the arduino, then use that to drill holes in the + deck.]) + (p [here's a cross section of a screw in the deck] + (figure :legend "screw cross section" + (image :file + "0-arduino-to-deck/screw-cross-section.png"))) + (p [check + ,(itemize + (item + [what would happen if the drill bit were larger than the + screw thread?]) + (item + [what would happen if the drill bit were smaller than the + screw body?]))])) + (subsubsection + :title [inserting drill bit] + (p (figure :legend "arduino to deck / insert bit" + (image :file "0-arduino-to-deck/1-insert-bit.png")) + [insert the drill bit into the teeth of the drill. + insert it far enough that the teeth will clamp on the + smooth part of the bit when they are tightened.]) + (p (figure + :legend "arduino to deck / twist tighten drill teeth" + (image :file "0-arduino-to-deck/2-twist-tighten-drill-teeth.png")) + [while holding the drill bit, twist end of the drill to tighten + the teeth. + make sure that the teeth end up gripping the flat part of + the drill bit.]) + (p [check + ,(itemize + (item + [where should the teeth clamp down on the drill bit?]) + (item + [what would happen if the teeth tightened on the recessed + part of the drill bit?]))])) + (subsubsection + :title [holding drill] + (p [hold the drill with one hand on the handle and trigger. + put the other hand on the orange nozzle, before the + black spinning part.])) + (subsubsection + :title [arduino placement] + (p [the arduino should be placed as shown in this picture.] + (figure :legend "arduino to deck / place arduino" + (image :file "0-arduino-to-deck/3-place-arduino.png"))) + (p [here's a closeup] + (figure :legend "arduino to deck / place arduino closeup" + (image :file + "0-arduino-to-deck/4-place-arduino-closeup.png")) + [the picture above shows where to place the arduino on the deck. + the arduino should line up with the holes on the deck. + this alignment line is highlighted in pink. + on the arduino, there's a hole on the top left, between the + orange reset button and black headers. + the green circle shows where the hole is. + the blue box encloses the arduino hole and two deck holes. + place the arduino hole mid-way between the two + deck holes.]) + (p [check + ,(itemize + (item + [should the arduino be upside-down?]) + (item + [what should the upper side of the arduino align with?]) + (item + [why not place the arduino up along the left side of the + robot?]))])) + (subsubsection + :title [drilling practice] + (p [strength check] + (itemize + (item [put on safety goggles]) + (item [unplug drill]) + (item [hold drill in one hand]) + (item [point drill at the ground]) + (item [point drill at the wall]))) + (p [steps for drilling into wood block] + (itemize + (item [plug in the drill]) + (item [place the drill bit in position]) + (item [bring the drill up to full speed, and keep it at full + speed while lowering and raising the drill]) + (item [push down until the drill bit has passed through an inch + of the wood block]) + (item [keep the drill at full speed]) + (item [stop before the drill smashes into the wood block]) + (item [keep the drill at full speed by holding the trigger]) + (item [bring the drill straight back up]) + (item [hold the trigger down to keep the drill at full speed]) + (item [once the drill is back out of the hole, let go of the + trigger]))) + (p [check + ,(itemize + (item + [should the drill be at full speed while the drill bit is + going down into the wood and coming back up?]) + (item + [how do you keep the drill at full speed?]) + (item + [what would happen if the drill bit were not at full + speed?]) + (item + [what would happen if the drill were twisted sideways while + the drill bit were in the wood?]))])) + (subsubsection + :title [drilling the first screw hole] + (itemize + (item [place the drill bit in position]) + (item [bring the drill up to full speed, and keep it full speed]) + (item [push down until the drill bit has passed through the + deck]) + (item [keep the drill at full speed]) + (item [stop before the drill smashes into the arduino]) + (item [keep the drill at full speed by holding the trigger]) + (item [bring the drill straight back up]) + (item [hold the trigger down to keep the drill at full speed]) + (item [once the drill is back out of the hole, let go of the + trigger])) + (p [check + ,(itemize + (item + [should the drill be at full speed while the drill bit is + going down into the wood and coming back up?]) + (item + [what would happen if the drill bit were not at full + speed?]) + (item + [how do you keep the drill at full speed?]))]))) + (subsection + :title [first screw] + (subsubsection + :title [fastening arduino to deck using #6-32x3/8\" screw] + (p [the "#6" part of "#6-32x3/8\"" is how big around the bolt is. + it is related to wire gauge. + bigger numbers mean larger screws. + smaller numbers means smaller screws.] + (figure :legend "arduino to deck / #6-32 screw" + (image :file + "0-arduino-to-deck/6-32-screw.png"))) + (p [check + ,(itemize + (item + [in the motor assembly, there are #4-40x1.25\" screws. + are those fatter, thinner, or the same thickness as the + #6-32x3/8\" screws?]))]) + (p [the "32" part of "#6-32x3/8\"" is a measurement of how close + the threads are to each other. + this is related to the angle of the thread, which is also + called pitch. + it is a count of how many times the thread wraps around one + inch of the screw body.]) + (p [the head is the flat part where some tool, like the alan + wrench, can exert force to spin the screw.]) + (p [check + ,(itemize + (item [how many times will the thread wrap around one inch of + the screw body?]) + (item [what about 2 inches? + how many times will the thread wrap around two + inches of the screw body?]) + (item [where can a tool exert turning force on + the screw?]))])) + (subsubsection + :title [fasten the arduino board to the deck] + (p [first we'll put the screw into the deck just enough so the deck + holds it in place. + then we will hold the arduino up to the screw and finish + tightening the screw down. + with the screw partially in, we do not have hold it as + rigidly while we are also holding the arduino and + the deck.]) + (p [push the #6-32 screw into the deck from the underside. + the underside is the brown side. + at the same time, spin the 6-32 screw so it rotates + clockwise while looking down on its head. + twist until the tip of the screw is about to stick out on + the top side of the deck.]) + (p [hold the arduino board flat to the deck and line up the arduino + hole so the screw can come up through it. + continue tightening the screw into the deck, spinning the same + direction as before. + tighten until the screw head touches the deck. + do not continue tightening after that.]) + (p [the arduino should still be flat against the deck still, just + as it was before tightening the screw.]) + (p [check + ,(itemize + (item [why do we insert the first screw partially before + holding up the arduino?]) + (item [which side of the deck is the top side?]))])) + (subsubsection + :title [assessment of the first screw] + (itemize + (item [,(bold [warning]), if you rotate the arduino board too + much,you will unscrew it from the deck and you'll have to + screw it back in. + rotating a few degrees should be ok.]) + (item [does the arduino stay with the deck when the deck moves?]) + (item [can the arduino board still rotate a few degrees?])))) + (subsection + :title [second hole and screw] + (subsubsection + :title [arduino board move relative to deck] + (p [without any screws, the arduino board can move independently of + the deck. + it can translate and rotate freely. + with the first screw, the arduino can rotate around one + point on the deck and can no longer translate much.]) + (p [the second screw limits rotation a lot. + it also makes translation even more difficult. + it might even be too small to be detectable by directly + looking at it.]) + (p [to choose where the second hole and screw should go, we should + keep in mind that the goal is to attach the deck to the + arduino. + this means minimizing rotation and translation. + the picture below shows that the second hole should be as + far as possible from the first hole, since that minimizes + rotation.] + (figure + :legend "arduino to deck / keep holes far apart" + (image + :file "0-arduino-to-deck/keep-holes-far-apart.png")))) + (subsubsection + :title [drilling and attaching second screw] + (p [to drill the second hole, follow the same steps as drilling the + first hole. + hold the arduino down as before, and drill through the hole + furthest away from the first hole. + then insert and tighten the screw as before.]))) + (subsection + :title [third and fourth hole and screw] + (p [even though the arduino is pretty well attached with just 2 + screws, we will add a third and fourth. + this gives practice drilling and tightening screws. + it also keeps the arduino fixed even more rigidly.])) + (subsection + :title [assessment of arduino deck attachment] + (itemize + (item [you should now be able to grab the deck and shake it. + the arduino should stay firmly in place while you do.]) + (item [the arduino should be close to but not touching an edge.]) + (item [there should be no warping on the arduino. + this could happen if the screws are too tight.])))) + (section + :title [breadboard]) + (section + :title [battery packs] + (subsection + :title [leads]) + (subsection + :title [deck attachment])) + (section + :title [motors] + (subsection + :title [leads]) + (subsection + :title [mount]) + (subsection + :title [deck attachment])) + (section + :title [wheels] + (subsection + :title [tread]) + (subsection + :title [motor])) + (section + :title [caster] + (subsection + :title [deck placement])) + (section + :title [sonars] + (subsection + :title [deck placement]))) + (chapter + :title [wiring and software] + (section + :title [serial] + (subsection + :title [software on computer] + (subsubsection + :title [arduino]) + (subsubsection + :title [fritzing])) + (subsection + :title [attach arduino and computer via cable]) + (subsection + :title [debugging common connection problems]) + (subsection + :title [arduino reset button])) + (section + :title [left sonar] + (subsection + :title [breadboard connectivity]) + (subsection + :title [cable]) + (subsection + :title [arduino headers]) + (subsection + :title [sound cm per microsecond at sea level])) + (section + :title [both sonars] + (subsection + :title [breadboard power rail] + (p [power rail can provide power to more than one device.]))) + (section + :title [left motor] + (subsection + :title [arduino digital output]) + (subsection + :title [quad half h bridge, aka motor controller]) + (subsection + :title [motor battery])) + (section + :title [both motors] + (subsection + :title [analogWrite])) + (section + :title [untethered] + (subsection + :title [arduino battery]) + (subsection + :title [off and on functions])) + (section + :title [follow] + (subsection + :title [same wiring as untethered]) + (subsection + :title [set motor]) + (subsection + :title [go]) + (subsection + :title [determining speed])) + (section + :title [stay on table] + (subsection + :title [stop]) + (subsection + :title [backup]) + (subsection + :title [turn around])))) + +;; Copyright 2016 daniel watson + +;; This file is part of challenge-bot. + +;; challenge-bot is free software: you can redistribute it and/or modify +;; it under the terms of the GNU Affero General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. + +;; challenge-bot is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU Affero General Public License for more details. + +;; You should have received a copy of the GNU Affero General Public +;; License along with challenge-bot. If not, see +;; . diff --git a/guide/makefile b/guide/makefile new file mode 100644 index 0000000..a510be8 --- /dev/null +++ b/guide/makefile @@ -0,0 +1,98 @@ +all:challenge-bot.html + +.PHONY: autobuild +autobuild: + ./autobuild.bash + +square.png: square.scad makefile + @openscad \ + --render \ + -o square.png \ + --camera=1.27,1.57,0.01,0,0,0,9.05 \ + --imgsize=931,634 \ + square.scad + +square1.png: square1.scad makefile + @openscad \ + --render \ + -o square1.png \ + --camera=1.27,1.57,0.01,0,0,0,9.05 \ + --imgsize=931,634 \ + square1.scad + +square2.png: square2.scad makefile + @openscad \ + --render \ + -o square2.png \ + --camera=1.27,1.57,0.01,0,0,0,9.05 \ + --imgsize=931,634 \ + square2.scad + +square3.png: square3.scad makefile + @openscad \ + --render \ + -o square3.png \ + --camera=1.27,1.57,0.01,0,0,0,9.05 \ + --imgsize=931,634 \ + square3.scad + +square.html: square.scm square.png square1.png square2.png square3.png makefile + @skribilo square.scm > square.html + +translate.png: translate.scad makefile + @openscad \ + --render \ + -o translate.png \ + --camera=1.27,1.57,0.01,0,0,0,9.05 \ + --imgsize=931,634 \ + translate.scad + +translate01.png: translate01.scad makefile + @openscad \ + --render \ + -o translate01.png \ + --camera=1.27,1.57,0.01,0,0,0,9.05 \ + --imgsize=931,634 \ + translate01.scad + +translate10.png: translate10.scad makefile + @openscad \ + --render \ + -o translate10.png \ + --camera=1.27,1.57,0.01,0,0,0,9.05 \ + --imgsize=931,634 \ + translate10.scad + +translate.html: translate.scm \ + translate.png \ + translate10.png \ + translate01.png \ + makefile + @skribilo translate.scm > translate.html + +%.png:%.svg makefile + @inkscape \ + --export-png $@ \ + --file $< \ + > /dev/null + +challenge-bot.html: challenge-bot.scm \ + 0-arduino-to-deck/screw-cross-section.png \ + 0-arduino-to-deck/6-32-screw.png \ + 0-arduino-to-deck/4-place-arduino-closeup.png \ + 0-arduino-to-deck/keep-holes-far-apart.png \ + makefile + @skribilo $< > $@ + +clean: + @rm -f \ + square.png \ + square1.png \ + square2.png \ + square3.png \ + square.html \ + translate.png \ + translate01.png \ + translate10.png \ + translate.html \ + challenge-bot.html diff --git a/guide/notes.org b/guide/notes.org new file mode 100644 index 0000000..bc2878f --- /dev/null +++ b/guide/notes.org @@ -0,0 +1,4 @@ +* TODO change code for left motor to only use digitalWrite +* TODO take pics of how to hold drill +* TODO take pics of 6-32 to show what "6" and "32" mean +* TODO figure out what exactly "32" measures diff --git a/guide/square.scad b/guide/square.scad new file mode 100644 index 0000000..c8ea7fd --- /dev/null +++ b/guide/square.scad @@ -0,0 +1,21 @@ +// tldr; AGPLv3+ +// copyright info at bottom +square(); +/* +Copyright 2016 daniel watson + +This file is part of challenge-bot. + +challenge-bot is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +challenge-bot is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with challenge-bot. If not, see . +*/ diff --git a/guide/square.scm b/guide/square.scm new file mode 100644 index 0000000..7d08b9a --- /dev/null +++ b/guide/square.scm @@ -0,0 +1,71 @@ +;; tldr; AGPLv3+ +;; copyright info at bottom +(use-modules (skribilo source c)) + +(document + :title [square] + (chapter + :title (source :language c [square()\;]) + :number #f + (p [here's the output of ,(prog (source :language c [square()\;]))]) + (figure + :legend "square();" + (image :file "square.png" :height 500)) + (p [openscad draws a square for the code + ,(source :language c [square()\;]).]) + (p [there are a couple other things worth noting here. + square is followed by an open and close parenthesis + ,(source :language c [()]), and then by a semicolon + ,(source :language c [\;])])) + (chapter + :title [square(1)\;] + :number #f + (p [here's the output of ,(source :language c [square(1)\;])]) + (figure + :legend "square(1);" + (image :file "square1.png" :height 500)) + (p [note that it's identical to the + ,(source :language c [square()\;]) output. this is because + by default, openscad guesses a value of 1 whenever a value + is left unspecified.])) + (chapter + :title [square(2)\;] + :number #f + (p [here's the output of ,(source :language c [square(2)\;])]) + (figure + :legend "square(2);" + (image :file "square2.png" :height 500)) + (p [note that it is twice the size of the prior 2 examples.])) + (chapter + :title [square(3)\;] + :number #f + (p [here's the output of ,(source :language c [square(3)\;])]) + (p [how big do you expect this square to be?]) + (figure + :legend "square(3);" + (image :file "square3.png" :height 500))) + (chapter + :title [quiz on square 1 2 3] + :number #f + (section + :title [questions for simplest square] + (p [what's the code for the simplest square?]) + (p [where is the bottom right corner of the simplest square?])))) + +;; Copyright 2016 daniel watson + +;; This file is part of challenge-bot. + +;; challenge-bot is free software: you can redistribute it and/or modify +;; it under the terms of the GNU Affero General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. + +;; challenge-bot is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU Affero General Public License for more details. + +;; You should have received a copy of the GNU Affero General Public +;; License along with challenge-bot. If not, see +;; . diff --git a/guide/square1.scad b/guide/square1.scad new file mode 100644 index 0000000..8c0bb87 --- /dev/null +++ b/guide/square1.scad @@ -0,0 +1,21 @@ +// tldr; AGPLv3+ +// copyright info at bottom +square(1); +/* +Copyright 2016 daniel watson + +This file is part of challenge-bot. + +challenge-bot is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +challenge-bot is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with challenge-bot. If not, see . +*/ diff --git a/guide/square2.scad b/guide/square2.scad new file mode 100644 index 0000000..25c47c6 --- /dev/null +++ b/guide/square2.scad @@ -0,0 +1,21 @@ +// tldr; AGPLv3+ +// copyright info at bottom +square(2); +/* +Copyright 2016 daniel watson + +This file is part of challenge-bot. + +challenge-bot is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +challenge-bot is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with challenge-bot. If not, see . +*/ diff --git a/guide/square3.scad b/guide/square3.scad new file mode 100644 index 0000000..daa2fa2 --- /dev/null +++ b/guide/square3.scad @@ -0,0 +1,21 @@ +// tldr; AGPLv3+ +// copyright info at bottom +square(3); +/* +Copyright 2016 daniel watson + +This file is part of challenge-bot. + +challenge-bot is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +challenge-bot is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with challenge-bot. If not, see . +*/ diff --git a/guide/translate.scad b/guide/translate.scad new file mode 100644 index 0000000..40e5bc0 --- /dev/null +++ b/guide/translate.scad @@ -0,0 +1,23 @@ +// tldr; AGPLv3+ +// copyright info at bottom + +translate([]){square();} + +/* +Copyright 2016 daniel watson + +This file is part of challenge-bot. + +challenge-bot is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +challenge-bot is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with challenge-bot. If not, see . +*/ diff --git a/guide/translate.scm b/guide/translate.scm new file mode 100644 index 0000000..feaad89 --- /dev/null +++ b/guide/translate.scm @@ -0,0 +1,42 @@ +;; tldr; AGPLv3+ +;; copyright info at bottom +(use-modules (skribilo source c)) + +(document + :title [translate] + (chapter + :title (source :language c [translate(\[\]){square\;}]) + :number #f + (p [here's the output of + ,(prog (source :language c [translate(\[0, 0\]){square()\;}]))]) + (figure + :legend "translate([0, 0]){square();}" + (image :file "translate.png" :height 500)) + (p [here's the output of + ,(prog (source :language c [translate(\[0, 1\]){square()\;}]))]) + (figure + :legend "translate([0, 1]){square();}" + (image :file "translate01.png" :height 500)) + (p [here's the output of + ,(prog (source :language c [translate(\[1, 0\]){square()\;}]))]) + (figure + :legend "translate([1, 0]){square();}" + (image :file "translate10.png" :height 500)))) + +;; Copyright 2016 daniel watson + +;; This file is part of challenge-bot. + +;; challenge-bot is free software: you can redistribute it and/or modify +;; it under the terms of the GNU Affero General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. + +;; challenge-bot is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU Affero General Public License for more details. + +;; You should have received a copy of the GNU Affero General Public +;; License along with challenge-bot. If not, see +;; . diff --git a/guide/translate01.scad b/guide/translate01.scad new file mode 100644 index 0000000..15a198e --- /dev/null +++ b/guide/translate01.scad @@ -0,0 +1,23 @@ +// tldr; AGPLv3+ +// copyright info at bottom + +translate([0, 1]){square();} + +/* +Copyright 2016 daniel watson + +This file is part of challenge-bot. + +challenge-bot is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +challenge-bot is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with challenge-bot. If not, see . +*/ diff --git a/guide/translate10.scad b/guide/translate10.scad new file mode 100644 index 0000000..e78e4e2 --- /dev/null +++ b/guide/translate10.scad @@ -0,0 +1,23 @@ +// tldr; AGPLv3+ +// copyright info at bottom + +translate([1, 0]){square();} + +/* +Copyright 2016 daniel watson + +This file is part of challenge-bot. + +challenge-bot is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published +by the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +challenge-bot is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with challenge-bot. If not, see . +*/