Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pico.scad 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright (c) 2022 - 2023 Thomas Buck (thomas@xythobuz.de)
  3. * Philipp Schönberger (mail@phschoen.de)
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * See <http://www.gnu.org/licenses/>.
  16. */
  17. // #######################
  18. // ## Raspberry Pi Pico ##
  19. // #######################
  20. pico_w = 21;
  21. pico_l = 51;
  22. pico_d = 1.0;
  23. pico_hole_d = 2.1;
  24. pico_hole_x = 4.8;
  25. pico_hole_y = 2.0;
  26. pico_hole_d_x = 11.4;
  27. pico_hole_d_y = pico_l - 2 * pico_hole_y;
  28. pico_usb_w = 8.0;
  29. pico_usb_h = 2.8;
  30. pico_usb_d = 6.0;
  31. pico_usb_off = 1.3;
  32. pico_co_w = pico_w + 1;
  33. pico_co_l = pico_l + 1;
  34. reset_button_dia = 4.0;
  35. reset_button_off_x = 7;
  36. reset_button_off_y = 12.15;
  37. pico_support_w = 6.5;
  38. pico_support_l = 5;
  39. pico_screw_depth = 6;
  40. pico_screw_d = 1.8;
  41. use <external/pico_case.scad>
  42. module pico_wrap()
  43. {
  44. translate([0,0,3.9])
  45. rotate([0,180,0])
  46. if (use_external_pico_model)
  47. translate([-pico_w / 2, -pico_l / 2, 0])
  48. pico();
  49. else
  50. pico_own();
  51. }
  52. module pico_own()
  53. {
  54. translate([-pico_w / 2, -pico_l / 2, 0])
  55. difference() {
  56. union() {
  57. color("green")
  58. cube([pico_w, pico_l, pico_d]);
  59. translate([(pico_w - pico_usb_w) / 2, pico_l - pico_usb_d + pico_usb_off, pico_d])
  60. cube([pico_usb_w, pico_usb_d, pico_usb_h]);
  61. }
  62. for (x = [0, pico_hole_d_x])
  63. for (y = [0, pico_hole_d_y])
  64. translate([pico_hole_x + x, pico_hole_y + y, -1])
  65. cylinder(d = pico_hole_d, h = pico_d + 2);
  66. }
  67. }