| 1 | #! /usr/bin/env racket |
| 2 | #lang racket/base |
| 3 | |
| 4 | (module+ main |
| 5 | (displayln "hi!")) |
| 6 | |
| 7 | (struct part (uuid name count use)) |
| 8 | (struct tool (uuid name use)) |
| 9 | |
| 10 | (define printed-parts-bag |
| 11 | (list |
| 12 | (part "c84161ef-9916-4955-8e07-b57e46942e18" |
| 13 | "wheel" 2 "move robot on ground") |
| 14 | (part "3c064806-a765-4b07-80b0-9b4713bee127" |
| 15 | "hair tie" 2 "better grip for wheels") |
| 16 | (part "048b2fc7-e6f0-4cdd-8839-25d96117ae30" |
| 17 | "motor mount" 2 "drive wheel to propel bot") |
| 18 | (part "8d42abf6-4a8b-4c55-b5bc-fb9e23e6eebc" |
| 19 | "caster holder" 1 "hold the caster ball") |
| 20 | (part "6666dca6-426f-492e-8383-1e62eac256b5" |
| 21 | "steel ball" 1 "third point of contact on ground for moving") |
| 22 | (part "c7cb21ca-cb0b-4eb0-ab53-e4070090dce0" |
| 23 | "zip tie" 2 "hold wires to motor") |
| 24 | (part "1399849c-db3b-4333-b8e2-bc64da28c484" |
| 25 | "sonar holder" 2 "hold the sonar to the deck holder") |
| 26 | (part "570de35f-e929-435a-867f-ca03030392d3" |
| 27 | "deck holder" 2 "provide a mount on the deck for sonar holder"))) |
| 28 | |
| 29 | (define metal-parts-bag |
| 30 | (list |
| 31 | (part "d74718f7-9b0c-45a5-a03c-372706bc4860" |
| 32 | "#6-32 screw" 15 |
| 33 | (string-append "hold angle bracket to deck and motor mount\n" |
| 34 | "hold ball caster standoff to deck")) |
| 35 | (part "e5710a11-8e71-4f42-8799-59c5bf4334cb" |
| 36 | "#4 lock nut" 4 "keep motor on motor screw") |
| 37 | (part "0daa47da-c4d5-41ec-8f3b-5d3358f072b5" |
| 38 | "#4 screw 1.25 inches" 4 "hold motor to motor mount") |
| 39 | (part "bd0d2316-e53d-4532-b057-851cb5581219" |
| 40 | "nickel plated angle bracket" 4 "hold motor mount and deck together") |
| 41 | (part "0d577243-8787-4f0b-8c10-b455fadd8f2a" |
| 42 | "#6 washer" 7 "hold #6 screw head from going through deck grid") |
| 43 | (part "c07ea25b-63a8-48d3-a834-67b6a48efc81" |
| 44 | "#2 screw" 2 "hold wheel to motor shaft"))) |
| 45 | |
| 46 | (define wires-bag |
| 47 | (list |
| 48 | (part "21239945-0cd0-45b5-872c-1448c7007ca7" |
| 49 | "male-female jump wires, 2 groups of 4 different colors" 8 |
| 50 | "connect sonar sensor to power and arduino. black yellow blue red.") |
| 51 | (part "7781754a-b2fe-47dc-b711-2f3f2e95f5e3" |
| 52 | "green solid core wire 200 mm, stripped" 2 |
| 53 | "transmit power between motor controller and motor") |
| 54 | (part "031d2167-d548-4e9a-a00b-5cdf902e3e84" |
| 55 | "yellow solid core wire 200 mm, not stripped" 2 |
| 56 | "transmit power between motor controller and motor") |
| 57 | (part "5390e8cc-1310-4fb3-bd07-8c9b295c592f" |
| 58 | "blue solid core wire 120 mm" 1 |
| 59 | "hook arduino pin 4 to motor controller pin \"3A\"") |
| 60 | (part "0b5d5d22-ce59-4741-94aa-25f9ba2bfd1c" |
| 61 | "blue solid core wire 120 mm" 1 |
| 62 | "hook arduino pin 9 to motor controller pin \"2A\"") |
| 63 | (part "434234e1-b6d7-43c3-a871-938fcc895c04" |
| 64 | "orange solid core wire 120 mm" 1 |
| 65 | "hook arduino pin 5 to motor controller pin \"4A\"") |
| 66 | (part "dffc57be-ff0a-43c4-8854-c3ba77cefc21" |
| 67 | "orange solid core wire 120 mm" 1 |
| 68 | "hook arduino pin 10 to motor controller pin \"1A\"") |
| 69 | (part "f1e4e95f-d069-4b83-b6c4-79dfd122219a" |
| 70 | "white solid core wire 120 mm" 1 |
| 71 | "hook arduino pin 3 to motor controller pin \"3,4EN\"") |
| 72 | (part "d084d477-3273-4444-b61d-ad24766a1751" |
| 73 | "white solid core wire 120 mm" 1 |
| 74 | "hook arduino pin 8 to motor controller pin \"1,2EN\"") |
| 75 | (part "d5eeffc3-debc-445d-a1ea-cb066abf4236" |
| 76 | "red solid core wire 35 mm" 2 |
| 77 | "make positive lead of battery packs easier to connect to breadboard") |
| 78 | (part "94f9da12-545b-4962-af43-d9701c1e5499" |
| 79 | "black solid core wire 35 mm" 2 |
| 80 | "make ground lead of battery packs easier to connect to breadboard") |
| 81 | (part "890e70d8-176f-421e-865c-e55e29256fb8" |
| 82 | "black solid core wire 55 mm" 1 |
| 83 | "hook ground rails on breadboard together") |
| 84 | (part "182e19ba-383c-40a7-9339-39804d4fca5b" |
| 85 | "black solid core wire 35 mm" 4 |
| 86 | "hook motor controller ground pins to breadboard ground rails") |
| 87 | (part "c2df71b6-aee9-45fa-b4a1-8464802302a9" |
| 88 | "black solid core wire 35 mm" 1 |
| 89 | "hook arduino ground pin to breadboard ground rail") |
| 90 | (part "de7a2ede-1159-4a4e-8c9e-6bb27fbae55d" |
| 91 | "red solid core wire 35 mm" 1 |
| 92 | "hook motor controller 5v pin to breadboard positive rail") |
| 93 | (part "66a049b6-6652-4a71-85a3-d5fd72a51fc5" |
| 94 | "red solid core wire 35 mm" 1 |
| 95 | "hook arduino 5v pin to breadboard positive rail"))) |
| 96 | |
| 97 | (define main-bag |
| 98 | (list |
| 99 | (part "73093d09-394a-4b0b-beab-71120517bf46" |
| 100 | "deck" 1 |
| 101 | "hold breadboard, sonar mount, motor mount, battery holders") |
| 102 | (part "08def069-0459-494e-9bf6-804821b62f73" |
| 103 | "arduino" 1 "send signal to motor, process info from sonar") |
| 104 | (part "4b7e5e64-e332-40d5-af20-239ad5ca5fd0" |
| 105 | "usb a-to-b cable" 1 "program the arduino from computer") |
| 106 | (part "d35e803e-860c-449d-9774-78295e501276" |
| 107 | "breadboard" 1 "hold motor controller and connect wires") |
| 108 | (part "2586c57d-11ed-40d0-961c-eb9c85611608" |
| 109 | "dual-half h bridge sn754410ne, aka motor controller" |
| 110 | 1 "direct power to motors") |
| 111 | (part "5ceac789-d68a-4078-a129-d721a99a8d6d" |
| 112 | "9v battery" 1 "power for motors") |
| 113 | (part "41aec402-c435-4fc3-a0e1-d8418d91c51e" |
| 114 | "9v battery holder" 1 "hold power for motors") |
| 115 | (part "47ae9666-f7d4-46db-bf90-051280df4d26" |
| 116 | "AA battery" 4 "power the arduino") |
| 117 | (part "14de012c-129e-4be2-b88c-c18f40461d38" |
| 118 | "AA battery holder" 1 "hold power for the arduino") |
| 119 | (part "6167b703-ce2e-4fb2-910c-092cdfccf90b" |
| 120 | "double stick tape (cm)" 15 "attach breadboard and 4xAA to deck") |
| 121 | (part "5767d684-0987-4700-aac0-80a2366ef728" |
| 122 | "sonar sensor" 2 "detect distance between bot and surroundings") |
| 123 | (part "ed17b7e2-554f-41d4-b43c-cf99bfdf7ce6" |
| 124 | "motor" 2 "drive wheel to propel bot") |
| 125 | (part "be525dfe-c58e-44ce-98b7-90084c17c9b8" |
| 126 | "5/64\" alan wrench" 1 "tighten #6-32 screws") |
| 127 | printed-parts-bag |
| 128 | wires-bag |
| 129 | metal-parts-bag)) |
| 130 | |
| 131 | (define tools |
| 132 | (list |
| 133 | (tool "abcc5589-2c1e-446d-8af1-b68822df9a28" |
| 134 | "drill" "make holes for arduino mount") |
| 135 | (tool "96e51009-f1bd-4054-8131-9bec2cdeb531" |
| 136 | "wire cutters" "cut wires and strip them for soldering") |
| 137 | (tool "889a99e3-b0f2-49a7-a2e2-e57c5070ad8e" |
| 138 | "screw driver" "tighten #4 screws") |
| 139 | (tool "fde5537b-e283-47f1-8af9-1d0ad97ae2ed" |
| 140 | "soldering iron" "put solder on wires") |
| 141 | (tool "5cd23e20-561a-483b-840b-0c6307c2889f" |
| 142 | "hot glue gun" "attach hair tie to wheel") |
| 143 | (tool "71a55342-12af-434a-8cb6-a99eef9e343e" |
| 144 | "electrical tape" "cover solder joints on battery holder"))) |
| 145 | |
| 146 | (define parts |
| 147 | (list |
| 148 | (part "be525dfe-c58e-44ce-98b7-90084c17c9b8" |
| 149 | "alan wrench" 1 "tighten #6-32 screws") |
| 150 | |
| 151 | (part "3c064806-a765-4b07-80b0-9b4713bee127" |
| 152 | "hair tie" 2 "better grip for wheels") |
| 153 | |
| 154 | (part "c7cb21ca-cb0b-4eb0-ab53-e4070090dce0" |
| 155 | "zip tie" 2 "hold wires to motor") |
| 156 | |
| 157 | (part "6666dca6-426f-492e-8383-1e62eac256b5" |
| 158 | "steel ball" 1 "third point of contact on ground for moving") |
| 159 | |
| 160 | (part "6167b703-ce2e-4fb2-910c-092cdfccf90b" |
| 161 | "double stick tape (cm)" 4 "attach breadboard and 4xAA to deck") |
| 162 | |
| 163 | (part "73093d09-394a-4b0b-beab-71120517bf46" |
| 164 | "deck" 1 |
| 165 | "hold breadboard, sonar mount, motor mount, battery holders") |
| 166 | |
| 167 | (part "d35e803e-860c-449d-9774-78295e501276" |
| 168 | "breadboard" 1 "hold motor controller and connect wires") |
| 169 | |
| 170 | (part "08def069-0459-494e-9bf6-804821b62f73" |
| 171 | "arduino" 1 "send signal to motor, process info from sonar") |
| 172 | |
| 173 | (part "5ceac789-d68a-4078-a129-d721a99a8d6d" |
| 174 | "9v battery" 1 "power for motors") |
| 175 | |
| 176 | (part "41aec402-c435-4fc3-a0e1-d8418d91c51e" |
| 177 | "9v battery holder" 1 "hold power for motors") |
| 178 | |
| 179 | (part "47ae9666-f7d4-46db-bf90-051280df4d26" |
| 180 | "AA battery" 4 "power the arduino") |
| 181 | |
| 182 | (part "14de012c-129e-4be2-b88c-c18f40461d38" |
| 183 | "AA battery holder" 1 "hold power for the arduino") |
| 184 | |
| 185 | (part "bd0d2316-e53d-4532-b057-851cb5581219" |
| 186 | "nickel plated angle bracket" 4 "hold motor mount and deck together") |
| 187 | |
| 188 | (part "5767d684-0987-4700-aac0-80a2366ef728" |
| 189 | "sonar sensor" 2 "detect distance between bot and surroundings") |
| 190 | |
| 191 | (part "1399849c-db3b-4333-b8e2-bc64da28c484" |
| 192 | "sonar holder" 2 "hold the sonar to the deck holder") |
| 193 | |
| 194 | (part "570de35f-e929-435a-867f-ca03030392d3" |
| 195 | "deck holder" 2 "provide a mount on the deck for sonar holder") |
| 196 | |
| 197 | (part "c84161ef-9916-4955-8e07-b57e46942e18" |
| 198 | "wheel" 2 "move robot on ground") |
| 199 | |
| 200 | (part "0d577243-8787-4f0b-8c10-b455fadd8f2a" |
| 201 | "#6 washer" 7 "hold #6 screw head from going through deck grid") |
| 202 | |
| 203 | (part "d74718f7-9b0c-45a5-a03c-372706bc4860" |
| 204 | "#6-32 screw" 15 |
| 205 | (string-append "hold angle bracket to deck and motor mount\n" |
| 206 | "hold ball caster standoff to deck")) |
| 207 | |
| 208 | (part "c07ea25b-63a8-48d3-a834-67b6a48efc81" |
| 209 | "#2 screw" 2 "hold wheel to motor shaft") |
| 210 | |
| 211 | (part "ed17b7e2-554f-41d4-b43c-cf99bfdf7ce6" |
| 212 | "motor" 2 "drive wheel to propel bot") |
| 213 | |
| 214 | (part "048b2fc7-e6f0-4cdd-8839-25d96117ae30" |
| 215 | "motor mount" 2 "drive wheel to propel bot") |
| 216 | |
| 217 | (part "e5710a11-8e71-4f42-8799-59c5bf4334cb" |
| 218 | "#4 lock nut" 4 "keep motor on motor screw") |
| 219 | |
| 220 | (part "0daa47da-c4d5-41ec-8f3b-5d3358f072b5" |
| 221 | "#4 screw 1.25 inches" 4 "hold motor to motor mount") |
| 222 | |
| 223 | (part "4b7e5e64-e332-40d5-af20-239ad5ca5fd0" |
| 224 | "usb a-to-b cable" 1 "program the arduino from computer") |
| 225 | |
| 226 | (part "2586c57d-11ed-40d0-961c-eb9c85611608" |
| 227 | "dual-half h bridge sn754410ne, aka motor controller" |
| 228 | 1 "direct power to motors") |
| 229 | |
| 230 | ;; wires |
| 231 | (part "21239945-0cd0-45b5-872c-1448c7007ca7" |
| 232 | "male-female jump wires, 2 groups of 4 different colors" 8 |
| 233 | "connect sonar sensor to power and arduino") |
| 234 | |
| 235 | (part "d5eeffc3-debc-445d-a1ea-cb066abf4236" |
| 236 | "red solid core wire 30 mm" 2 |
| 237 | "make positive lead of battery packs easier to connect to breadboard") |
| 238 | |
| 239 | (part "94f9da12-545b-4962-af43-d9701c1e5499" |
| 240 | "black solid core wire 30 mm" 2 |
| 241 | "make ground lead of battery packs easier to connect to breadboard") |
| 242 | |
| 243 | (part "dffc57be-ff0a-43c4-8854-c3ba77cefc21" |
| 244 | "orange solid core wire 120 mm" 1 |
| 245 | "hook arduino pin 9 to motor controller pin \"1A\"") |
| 246 | |
| 247 | (part "0b5d5d22-ce59-4741-94aa-25f9ba2bfd1c" |
| 248 | "blue solid core wire 120 mm" 1 |
| 249 | "hook arduino pin 9 to motor controller pin \"2A\"") |
| 250 | |
| 251 | (part "d084d477-3273-4444-b61d-ad24766a1751" |
| 252 | "white solid core wire 120 mm" 1 |
| 253 | "hook arduino pin 8 to motor controller pin \"1,2EN\"") |
| 254 | |
| 255 | (part "434234e1-b6d7-43c3-a871-938fcc895c04" |
| 256 | "orange solid core wire 90 mm" 1 |
| 257 | "hook arduino pin 5 to motor controller pin \"4A\"") |
| 258 | |
| 259 | (part "5390e8cc-1310-4fb3-bd07-8c9b295c592f" |
| 260 | "blue solid core wire 90 mm" 1 |
| 261 | "hook arduino pin 4 to motor controller pin \"3A\"") |
| 262 | |
| 263 | (part "f1e4e95f-d069-4b83-b6c4-79dfd122219a" |
| 264 | "white solid core wire 90 mm" 1 |
| 265 | "hook arduino pin 3 to motor controller pin \"3,4EN\"") |
| 266 | |
| 267 | (part "de7a2ede-1159-4a4e-8c9e-6bb27fbae55d" |
| 268 | "red solid core wire 25 mm" 1 |
| 269 | "hook motor controller 5v pin to breadboard positive rail") |
| 270 | |
| 271 | (part "7781754a-b2fe-47dc-b711-2f3f2e95f5e3" |
| 272 | "green solid core wire 175 mm" 2 |
| 273 | "connect motor controller and motor") |
| 274 | |
| 275 | (part "031d2167-d548-4e9a-a00b-5cdf902e3e84" |
| 276 | "yellow solid core wire 175 mm" 2 |
| 277 | "transmit power between motor controller and motor") |
| 278 | |
| 279 | (part "182e19ba-383c-40a7-9339-39804d4fca5b" |
| 280 | "black solid core wire 25 mm" 4 |
| 281 | "hook motor controller ground pins to breadboard ground rails") |
| 282 | |
| 283 | (part "c2df71b6-aee9-45fa-b4a1-8464802302a9" |
| 284 | "black solid core wire 25 mm" 1 |
| 285 | "hook arduino ground pin to breadboard ground rail") |
| 286 | |
| 287 | (part "890e70d8-176f-421e-865c-e55e29256fb8" |
| 288 | "black solid core wire 55 mm" 1 |
| 289 | "hook ground rails on breadboard together") |
| 290 | |
| 291 | (part "66a049b6-6652-4a71-85a3-d5fd72a51fc5" |
| 292 | "red solid core wire 25 mm" 1 |
| 293 | "hook arduino 5v pin to breadboard positive rail"))) |