Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CyanLight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fxk8y
CyanLight
Commits
37af9892
Commit
37af9892
authored
3 years ago
by
fxk8y
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.services.c3pb.de:fxk8y/CyanLight
parents
71ccc729
e4ed2012
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CS-qthing-testFW/device_main.cpp
+19
-5
19 additions, 5 deletions
CS-qthing-testFW/device_main.cpp
cad/CyanStripe/Material.scad
+11
-0
11 additions, 0 deletions
cad/CyanStripe/Material.scad
cad/CyanStripe/PCB.scad
+39
-4
39 additions, 4 deletions
cad/CyanStripe/PCB.scad
with
69 additions
and
9 deletions
CS-qthing-testFW/device_main.cpp
+
19
−
5
View file @
37af9892
...
@@ -14,10 +14,17 @@ using qthing::RGBW8;
...
@@ -14,10 +14,17 @@ using qthing::RGBW8;
using
qthing
::
HSV
;
using
qthing
::
HSV
;
// TODO: Move somewhere else!
constexpr
uint8_t
channelW
=
27
;
constexpr
uint8_t
channelX
=
23
;
constexpr
uint8_t
channelY
=
22
;
constexpr
uint8_t
channelZ
=
21
;
class
FunctionTestAnimation
:
public
Animation
<
HSV
>
{
class
FunctionTestAnimation
:
public
Animation
<
HSV
>
{
public:
public:
FunctionTestAnimation
()
{}
FunctionTestAnimation
(
uint8_t
size
)
:
size
((
double
)
size
)
{}
void
step
()
override
final
{
void
step
()
override
final
{
...
@@ -29,14 +36,15 @@ class FunctionTestAnimation : public Animation<HSV> {
...
@@ -29,14 +36,15 @@ class FunctionTestAnimation : public Animation<HSV> {
}
}
HSV
render
(
uint16_t
address
)
{
HSV
render
(
uint16_t
address
)
{
float
h
=
fmod
(
this
->
time
/
6400.
l
/*
+ address/
8.l */
,
1
);
float
h
=
fmod
(
this
->
time
/
6400.
l
+
address
/
size
,
1
);
return
HSV
(
h
,
1.0
f
,
1.0
f
);
return
HSV
(
h
,
1.0
f
,
1.0
f
);
}
}
private
:
private
:
long
time
;
float
v
;
float
v
;
long
time
;
double
size
;
};
};
...
@@ -80,9 +88,15 @@ void device_main() {
...
@@ -80,9 +88,15 @@ void device_main() {
qthing
::
Config
cfg
;
qthing
::
Config
cfg
;
auto
ledW
=
cfg
.
add
<
qthing
::
leds
::
WS2812B_V2
>
(
GPIO_NUM_27
,
8
);
auto
ledW
=
cfg
.
add
<
qthing
::
leds
::
WS2812B_V2
>
((
gpio_num_t
)
channelW
,
8
);
auto
ledX
=
cfg
.
add
<
qthing
::
leds
::
WS2812B_V2
>
((
gpio_num_t
)
channelX
,
50
);
auto
ledY
=
cfg
.
add
<
qthing
::
leds
::
WS2812B_V2
>
((
gpio_num_t
)
channelY
,
50
);
auto
ledZ
=
cfg
.
add
<
qthing
::
leds
::
WS2812B_V2
>
((
gpio_num_t
)
channelZ
,
50
);
cfg
.
add
<
Animator
<
RGBW8
>>
(
ledW
)
->
setNewAnimation
<
FunctionTestAnimation
>
();
cfg
.
add
<
Animator
<
RGBW8
>>
(
ledW
)
->
setNewAnimation
<
FunctionTestAnimation
>
(
8
);
cfg
.
add
<
Animator
<
RGBW8
>>
(
ledX
)
->
setNewAnimation
<
FunctionTestAnimation
>
(
50
);
cfg
.
add
<
Animator
<
RGBW8
>>
(
ledY
)
->
setNewAnimation
<
FunctionTestAnimation
>
(
50
);
cfg
.
add
<
Animator
<
RGBW8
>>
(
ledZ
)
->
setNewAnimation
<
FunctionTestAnimation
>
(
50
);
cfg
.
apply
();
cfg
.
apply
();
...
...
This diff is collapsed.
Click to expand it.
cad/CyanStripe/Material.scad
+
11
−
0
View file @
37af9892
...
@@ -12,3 +12,14 @@ module FR4(alpha=1.0) {
...
@@ -12,3 +12,14 @@ module FR4(alpha=1.0) {
module Solder(alpha=1.0) {
module Solder(alpha=1.0) {
color("grey", alpha=alpha) children();
color("grey", alpha=alpha) children();
}
}
module GreyPlastic(alpha=1.0) {
color("grey", alpha=alpha) children();
}
module Copper(alpha=1.0) {
color("#912E17", alpha=alpha) children();
// color("maroon", alpha=alpha) children();
}
Copper() cube(20);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cad/CyanStripe/PCB.scad
+
39
−
4
View file @
37af9892
...
@@ -41,7 +41,9 @@ co_y = -8.6;
...
@@ -41,7 +41,9 @@ co_y = -8.6;
module pcbScrewHoles(tz=0) {
module pcbScrewHoles(tz=0) {
for (tx=[-32.75, 5.75], ty=[-27.5, 27.5]) translate([tx, ty, tz]) children();
for (tx=[-32.75, 5.75], ty=[-27.5, 27.5])
translate([tx, ty, tz])
children();
}
}
module pcbOutline() {
module pcbOutline() {
...
@@ -69,9 +71,42 @@ module pcb3D(pcb_t=pcb_t()) {
...
@@ -69,9 +71,42 @@ module pcb3D(pcb_t=pcb_t()) {
translate([0, 0, -$E*2]) cylinder(d=M3()-$E, h=pcb_t()+4*$E);
translate([0, 0, -$E*2]) cylinder(d=M3()-$E, h=pcb_t()+4*$E);
}
}
Solder()
// Solder()
translate([tpow_x(), tpow_y(), pcb_t() - $E])
// translate([tpow_x(), tpow_y(), pcb_t() - $E])
cube([tpow_sx(), tpow_sy(), tpow_sz()], center=true);
// cube([tpow_sx(), tpow_sy(), tpow_sz()], center=true);
translate([tpow_x(), tpow_y(), pcb_t() - $E])
terminal2();
}
}
// MP = measure precisely!
t_h0 = 9.5; // TODO: MP!
t_h1 = 14.0; // TODO: MP!
t_l_sx = 5.5; // TODO: MP! // l = lever
t_oh = 1.5; // oh = overhang
t2_sx = 11.0 + t_oh;
t2_sy = 11.5;
t2_l_sy = 8.5; // TODO: MP!
module terminal2() {
GreyPlastic() difference() {
union() {
translate([-t_oh/2, 0, 0])
linear_extrude(t_h0)
roundRect(t2_sx, t2_sy, 0.69, center=true);
translate([-t_oh/2, 0, 0])
linear_extrude(t_h1)
roundRect(t_l_sx, t2_l_sy, 1.337, center=true);
}
_ty = t2_sy * 1/4;
for (ty=[-_ty, _ty])
translate([-t2_sx/2, ty, t_h0/2])
rotate([0, -90, 0])
cylinder(d=3, h=8, center=true);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment