diff --git a/lib.scad b/lib.scad index 575b358..81257ec 100644 --- a/lib.scad +++ b/lib.scad @@ -29,6 +29,7 @@ include include include include +include include include include diff --git a/libtest.png b/libtest.png index e6a17ff..71577de 100644 Binary files a/libtest.png and b/libtest.png differ diff --git a/libtest.scad b/libtest.scad index 2e891ee..92b25a1 100644 --- a/libtest.scad +++ b/libtest.scad @@ -385,7 +385,7 @@ sk_brackets_y = extrusion_brackets_y + 80; kp_pillow_blocks_y = sk_brackets_y + 50; scs_bearing_blocks_y = kp_pillow_blocks_y + 60; -translate([x4 + 150, belts_y + 58]) { +translate([x4 + 200, belts_y + 58]) { belt_test(); translate([0, 60]) diff --git a/readme.md b/readme.md index e9deb5e..6fafd18 100644 --- a/readme.md +++ b/readme.md @@ -464,6 +464,7 @@ PCB cameras. | Qty | Module call | BOM entry | | ---:|:--- |:---| | 1 | ```camera(rpi_camera_v1)``` | Raspberry Pi camera V1 | +| 1 | ```camera(rpi_camera_v2)``` | Raspberry Pi camera V2 | | 1 | ```camera(rpi_camera)``` | Raspberry Pi focusable camera | diff --git a/tests/png/cameras.png b/tests/png/cameras.png index 4b676d7..565546f 100644 Binary files a/tests/png/cameras.png and b/tests/png/cameras.png differ diff --git a/vitamins/camera.scad b/vitamins/camera.scad index 8ea0b27..a33c2ac 100644 --- a/vitamins/camera.scad +++ b/vitamins/camera.scad @@ -81,7 +81,7 @@ module camera(type) { //! Draw specified PCB camera cube([flex.x, eps, flex.y], center = true); translate_z(conn.z - flex.y) - translate(pos - [0, conn.y / 2]) + translate([camera_lens_offset(type).x, pos.y] - [0, conn.y / 2]) cube([flex.x, eps, flex.y], center = true); } } diff --git a/vitamins/cameras.scad b/vitamins/cameras.scad index d4df234..4efd536 100644 --- a/vitamins/cameras.scad +++ b/vitamins/cameras.scad @@ -35,6 +35,21 @@ rpi_camera_v1 = ["rpi_camera_v1", "Raspberry Pi camera V1", rpi_camera_v1_pcb, [ [0, 12 - 1.5 - 2.5], [8, 5, 1] ]; +rpi_camera_v2_pcb = ["", "", 25, 23.862, 1, 2, 2.2, 0, "green", false, [[2, -2], [-2, -2], [2, -14.5], [-2, -14.5]], + [ + [12.5, 2.75, 0, "-flat_flex", true], + ], + []]; + +rpi_camera_v2 = ["rpi_camera_v2", "Raspberry Pi camera V2", rpi_camera_v2_pcb, [0, 9.6 - 12], + [ + [[8.5, 8.5, 3], 0], + [[0, 0, 4], 7.5 / 2], + [[0, 0, 5], 5.5 / 2, [1.5/2, 2/2, 0.5]], + ], + [-13.8 + 12.5, 23.862 / 2 - 4.7], [8.5, 4, 1] +]; + rpi_camera_pcb = ["", "", 36, 36, 1.6, 0, 3.2, 0, "green", false, [[3.5, -3.5], [-3.5, -3.5], [3.5, 3.5], [-3.5, 3.5]], [ [18, 4.25, 0, "-flat_flex", true], @@ -53,6 +68,6 @@ rpi_camera = ["rpi_camera", "Raspberry Pi focusable camera", rpi_camera_pcb, [0, [0, 18 - 1.5 - 2.5], [8, 5, 1.6] ]; -cameras = [rpi_camera_v1, rpi_camera]; +cameras = [rpi_camera_v1, rpi_camera, rpi_camera_v2]; use