refactor: remove trailing whitespace

This commit is contained in:
Azzam S.A
2024-11-26 01:41:51 +07:00
parent ae509a0595
commit 2bca3a19b8
16 changed files with 102 additions and 102 deletions

2
.gitignore vendored
View File

@@ -10,7 +10,7 @@
*.tmp
*-save.pro
*-save.kicad_pcb
fp-info-cache
fp-info-cache
_autosave*
*.drl
*.gbrjob

View File

@@ -21,13 +21,13 @@ mirror()
bottom();
//translate([13,11,2.1])
// magsafe_ring();
// The exported board from KiCad, for debug
//translate([0,0,0])
// board();
switches(true);
diodes();
rj45();
@@ -57,4 +57,4 @@ mirror()
translate([-43,36.8,0]) magnet();
translate([-43,-0.2,0]) magnet();
}
}
}

View File

@@ -20,13 +20,13 @@ difference()
bottom();
//translate([13,11,2.1])
//magsafe_ring();
// The exported board from KiCad, for debug
//translate([0,0,0])
//board();
switches(false);
diodes();
rj45();

View File

@@ -44,9 +44,9 @@ translate([0,0,1.6])
color("pink")
translate([0,0,5.1])
linear_extrude(1.5)
offset( delta=0.5)
offset( delta=0.5)
base();
*/
module base_line_extruded (factor, extrusion)

View File

@@ -11,23 +11,23 @@ linear_extrude(height=3.05)
translate([-3.175,-0.36,0])
linear_extrude(height=3.05)
circle(d=3);
// Body
linear_extrude(height=thickness)
square([11.1,4.2], center=true);
square([11.1,4.2], center=true);
translate([0,1.9,0])
linear_extrude(height=thickness)
square([5.65, 2.09]);
square([5.65, 2.09]);
// Metal soldering parts
translate([5.45,1.04,0])
linear_extrude(height=thickness)
square([2.5, 2.55]);
square([2.5, 2.55]);
translate([-7.95,-1.7,0])
linear_extrude(height=thickness)
square([2.5, 2.55]);
square([2.5, 2.55]);
}
module column() {
@@ -37,36 +37,36 @@ translate([0, 19, 0]) switch();
translate([0, 38, 0]) switch();
}
module switch() {
// hotswap socket
color("#ff7f0e")
translate([0,0,1.85])
rotate([180,0,0])
hotswap_mx();
// main pin of switch
// 4mm d, 2.8mm high, 1.6mm pcb
// means 1.2 of it sticks below, 1.3 for margin
// 4mm d, 2.8mm high, 1.6mm pcb
// means 1.2 of it sticks below, 1.3 for margin
color("#2ca02c")
translate([-0.57, -4.7, 0])
linear_extrude(height=1)
circle(d=4.2);
// The two switch alignment pins
// They will need to be snipped if too long
color("#d62728")
translate([-5.74, -4.7, 0])
linear_extrude(height=1)
circle(d=1.8);
color("#d62728")
translate([4.45, -4.7, 0])
linear_extrude(height=1)
circle(d=1.8);
}
module diode() {
@@ -153,10 +153,10 @@ module mounting_hole() {
module bumper() {
color("#17becf")
translate([41, 29, 2.5])
translate([41, 29, 2.5])
cylinder(h=2, r=5);
color("#17becf")
translate([41, 29, 1.3])
translate([41, 29, 1.3])
cylinder(h=1.2, r1=4.5, r2=5);
}
@@ -168,6 +168,6 @@ module magnet() {
hotswap_mx();
color("green")
translate([0,0,0])
translate([0,0,0])
import("hotswap.stl");
*/

View File

@@ -10,9 +10,9 @@ module bottom()
color("pink")
translate([0,0,0])
linear_extrude(bottom_plate_thickness)
offset( delta=0)
offset( delta=0)
base();
}
}
module base()
{
@@ -39,23 +39,23 @@ module hotswap_mx() {
translate([-3.175,-0.36,0])
linear_extrude(height=3.05)
circle(d=3);
// Body
linear_extrude(height=thickness)
square([11.1,4.2], center=true);
square([11.1,4.2], center=true);
translate([0,1.9,0])
linear_extrude(height=thickness)
square([5.65, 2.09]);
square([5.65, 2.09]);
// Metal soldering parts
translate([5.45,1.04,0])
linear_extrude(height=thickness)
square([2.5, 2.55]);
square([2.5, 2.55]);
translate([-7.95,-1.7,0])
linear_extrude(height=thickness)
square([2.5, 2.55]);
square([2.5, 2.55]);
}
@@ -66,7 +66,7 @@ translate([0, 19, 0]) switch(bottom);
translate([0, 38, 0]) switch(bottom);
}
module switch(bottom) {
// hotswap socket
color("#ff7f0e")
@@ -74,29 +74,29 @@ module switch(bottom) {
rotate([180,0,0])
mirror([0,bottom ? 1 : 0,0])
hotswap_mx();
// main pin of switch
// 4mm d, 2.8mm high, 1.6mm pcb
// means 1.2 of it sticks below, 1.3 for margin
// 4mm d, 2.8mm high, 1.6mm pcb
// means 1.2 of it sticks below, 1.3 for margin
color("#2ca02c")
translate([-0.57, -4.7, 0])
linear_extrude(height=1)
circle(d=4.2);
// The two switch alignment pins
// They will need to be snipped if too long
color("#d62728")
translate([-5.74, -4.7, 0])
linear_extrude(height=1)
circle(d=1.8);
color("#d62728")
translate([4.45, -4.7, 0])
linear_extrude(height=1)
circle(d=1.8);
}
module diode() {
@@ -183,10 +183,10 @@ module mounting_hole() {
module bumper() {
color("#17becf")
translate([41, 29, 2.5])
translate([41, 29, 2.5])
cylinder(h=2, r=5);
color("#17becf")
translate([41, 29, 1.3])
translate([41, 29, 1.3])
cylinder(h=1.2, r1=4.5, r2=5);
}
@@ -197,32 +197,32 @@ module magnet() {
module switches(bottom) {
// Columns starting from MCU
translate([19.3,-2.84,0])
translate([19.3,-2.84,0])
column(bottom);
//rotate([0,0,180])
translate([0.3,-0.3,0])
translate([0.3,-0.3,0])
column(bottom);
translate([-18.7,6.05,0])
translate([-18.7,6.05,0])
column(bottom);
translate([-37.7,-0.3,0])
translate([-37.7,-0.3,0])
column(bottom);
translate([-56.7,-10.308,0])
translate([-56.7,-10.308,0])
column(bottom);
// Thumb cluster
translate([14.6264,-24.52])
translate([14.6264,-24.52])
switch(bottom);
rotate([0,0,-10])
translate([40.3,-19.3])
translate([40.3,-19.3])
switch(bottom);
rotate([0,0,-23])
translate([65.65,-7.09])
translate([65.65,-7.09])
switch(bottom);
}
@@ -291,9 +291,9 @@ module mounting_holes() {
}
//color("green")
//translate([0,0,0])
//translate([0,0,0])
// import("hotswap.stl");
// Height of case is:
// 5.0mm from pcb to switch inset
// 1.6mm pcb height
@@ -321,25 +321,25 @@ module case() {
module switch_holes() {
// Columns starting from mcu
hole_column();
translate([-19, 2.54, 0]) hole_column();
translate([-38, 8.89, 0]) hole_column();
translate([-57, 2.54, 0]) hole_column();
translate([-76, -7.468, 0]) hole_column();
hole_column();
translate([-19, 2.54, 0]) hole_column();
translate([-38, 8.89, 0]) hole_column();
translate([-57, 2.54, 0]) hole_column();
translate([-76, -7.468, 0]) hole_column();
// Thumb cluster
translate([-4.674, -59.69, 0]) switch_hole();
rotate(-10) translate([21, -54.45, 0]) switch_hole();
rotate(-23) translate([46.25, -42.25, 0]) switch_hole();
translate([-4.674, -59.69, 0]) switch_hole();
rotate(-10) translate([21, -54.45, 0]) switch_hole();
rotate(-23) translate([46.25, -42.25, 0]) switch_hole();
}
module hole_column() {
switch_hole();
translate([0, -19, 0]) switch_hole();
translate([0, -19, 0]) switch_hole();
translate([0, -38, 0]) switch_hole();
}
module switch_hole() {
module switch_hole() {
translate([11.64, 23.45, 0]){
color("green") {
linear_extrude(10) {

View File

@@ -8,6 +8,6 @@ module plate()
{
import ("plate.svg", center=false);
}
linear_extrude(1.6)
plate();

View File

@@ -1,7 +1,7 @@
3D-printed compact case
=======================
If you just want to make small adjustments and generate
If you just want to make small adjustments and generate
your own version, install openscad, and open a scad file
and press F6 to generate. Export->stl to get printable model.
@@ -18,7 +18,7 @@ increase "turn off rendering at" to 3 million.
(this will enable multi-thread rendering and speed things
up dramatically!)
For the slicer, I did not do much experimenting...
For the slicer, I did not do much experimenting...
Maybe somebody into 3D printing could help me out with
the silicone bumper recesses: removing the supports in
these holes is a pain...

View File

@@ -18,7 +18,7 @@ Since the PCBs are the most expensive items, and you cant order less than 5 from
Im not including switches and keycaps, since these are a matter of personal taste.
You will need 36 switches and 1u(the regular letter sized) keycaps per set.
This can easily be the most expensive
This can easily be the most expensive
| Part | Quantity | Where to get it | Estimated price (including shipping) |
| ------------ | -------- | --------------- | --------------- |
@@ -57,13 +57,13 @@ Only the pins on the 2 long sides are actually used, but if you have the RP2040-
#### Socket the MCU
Socketing makes it easier to reuse the MCU(the RP2040-Zero) for another build later, or swap it if its broken or malfunctions.
Socketing makes it easier to reuse the MCU(the RP2040-Zero) for another build later, or swap it if its broken or malfunctions.
If you have sockets for the MCU, mount them on a breadboard, or stick them in some cardboard to get them straight when mounting.
![Socketing 1](images/socket1.jpeg)
Stick the clipped diode feet through the MCU, and down into the socket. Use a tool, or you will stick it into your fingers(been there, done that...).
Stick the clipped diode feet through the MCU, and down into the socket. Use a tool, or you will stick it into your fingers(been there, done that...).
![Socketing 2](images/socket2.jpeg)
@@ -79,7 +79,7 @@ Use the two longest yellow pin headers that come with the MCU: solder them to th
### Step 3: Install the Switches
Next, it's time to install the switches.
Next, it's time to install the switches.
This can be a bit tricky to get straight, since there is only 3 pin holes.
Try to solder one column at a time, use something to align the switches, and tape them down before soldering.

View File

@@ -4,7 +4,7 @@
Welcome to the Cheapino Keyboard v2 Build Guide!
In this guide, I will walk you through the steps to build your own custom keyboard using the Cheapino v2 kit.
The Cheapino is a budget-friendly DIY split mechanical keyboard that is perfect for beginners who are looking
The Cheapino is a budget-friendly DIY split mechanical keyboard that is perfect for beginners who are looking
to try their hand at building their own keyboard.
I assume you read the [ordering guide](orderingguide.md) and have all the mandatory parts and tools.
@@ -26,24 +26,24 @@ Make sure you follow the PCB outline for the sockets(white lines),
its very easy to solder them in the wrong direction(at least that
is what I managed to do with more than half of them first time...)
Just make sure to place them on the white outline, AND that
Just make sure to place them on the white outline, AND that
the big switch hole is unobstructed.
![Hotswap](images/buildguidev2/hotswap.png)
### Step 2: Diodes
You need to be careful to solder the diodes the correct way.
The line on the diode should always be closest to the square pad of the footprint,
NOT the round one. The PCB supports SMD and throug hole diodes,
and you can choose which side you want to mount them.
You need to be careful to solder the diodes the correct way.
The line on the diode should always be closest to the square pad of the footprint,
NOT the round one. The PCB supports SMD and throug hole diodes,
and you can choose which side you want to mount them.
I suggest mounting them on the top side, to keep height of board as low as possible.
I like to solder from the component side, not the dangling legs side, but each to his own ;)
![Diodes](images/buildguidev2/diodes.png)
If you use through hole diodes and have sockets for the MCU,
If you use through hole diodes and have sockets for the MCU,
keep the legs you cut off and use them for socketing the MCU.
![Diode legs](images/buildguidev2/diodes_legs.png)
@@ -72,7 +72,7 @@ Only the pins on the 2 long sides are actually used, but if you have the RP2040-
#### Socket the MCU
Socketing makes it easier to reuse the MCU(the RP2040-Zero) for another build later, or swap it if its broken or malfunctions.
Socketing makes it easier to reuse the MCU(the RP2040-Zero) for another build later, or swap it if its broken or malfunctions.
NB: The cheap sockets linked from the ordering guide happily accepts diode legs, while the more "expensive"
ones typically have larger holes, so for these you might wanna go with picking out the legs that came in the
@@ -82,7 +82,7 @@ If you have sockets for the MCU, mount them on a breadboard, or stick them in so
![Socketing 1](images/socket1.jpeg)
Stick the clipped diode feet through the MCU, and down into the socket. Use a tool, or you will stick it into your fingers(been there, done that...).
Stick the clipped diode feet through the MCU, and down into the socket. Use a tool, or you will stick it into your fingers(been there, done that...).
![Socketing 2](images/socket2.jpeg)
@@ -98,7 +98,7 @@ Use the two longest yellow pin headers that come with the MCU: solder them to th
### Step 5: Install the Switches
Next, it's time to install the switches.
Next, it's time to install the switches.
Note: if you installed hotswap sockets you do NOT need to solder switches...
If you only have 3 pin switches, refer to hints in the v1 build guide on how to align them.
@@ -123,11 +123,11 @@ Put the encoder in the footprint on the right side, make sure its flush to the P
### Step 8: Trim below and install bumpers
Use the cutters to trim any extruding wires on the underside of the PCBs.
Use the cutters to trim any extruding wires on the underside of the PCBs.
I havent done this with anything else than the encoder pins which I found to
stick out a little extra.
Maybe clip them inside a plastic bag to prevent the metal from flying around.
Maybe clip them inside a plastic bag to prevent the metal from flying around.
Install rubber bumpers to protect your desk and keep the keyboard from moving.
The v2 outline is a bit smaller than the v1, so be generous with the bumpers,

View File

@@ -36,7 +36,7 @@ in the case for these, for future use:
https://aliexpress.com/item/1005001658853871.html
Once you printed all 4 parts of the case, you need to install the m2 heat inserts.
You can insert them by using your soldering iron to heat them while applying gentle
You can insert them by using your soldering iron to heat them while applying gentle
pressure and maybe press last 10% with a flat surface, to get a nice finish.
Overly complicated explanation here:
https://hackaday.com/2019/02/28/threading-3d-printed-parts-how-to-use-heat-set-inserts/
@@ -79,7 +79,7 @@ Place the PCB inside the case
![image](gallery/case-build/8.png)
![image](gallery/case-build/9.png)
Flip it upside down
Flip it upside down
**Note:** i didn't use the case bottom, but if you did, set it in place at this point.
insert the screws through the case bottom if youre using it, if not, just screw them in through the screw holes in the PCB.
![image](gallery/case-build/10.png)
@@ -87,8 +87,8 @@ insert the screws through the case bottom if youre using it, if not, just screw
Once this is done, flip back over and refit the switches and keycaps. As i mentioned, my printer isn't callibrated very well, so pushing the switches in took a LOT of force, but they did go in, and as a bonus, this means my switches have zero wobble.
It looked like this once i got all the switches and keycaps installed.
![image](gallery/case-build/12.png)
![image](gallery/case-build/12.png)
Instead of using the case bottom, i just added some 3M dots as cusioning, and they work perfectly well for me.
![image](gallery/case-build/13.png)
![image](gallery/case-build/13.png)

View File

@@ -81,7 +81,7 @@ Tweaking the encoder actions is supported in vial, but needs to be done in the k
(you dont HAVE to be a progammer to change it, but you may call yourself a novice programmer once you do...)
In the method called "turned", there are actions defined for multiple layers, this one is tweaked for my personal layer...
The "else" section at line 26, will send page down for clockwise encoder turns, and page down for counter clockwise.
The first if, line 20, sends volume up/down if you are on layer 6.
The first if, line 20, sends volume up/down if you are on layer 6.
The encoder push is defined to media pause/play in the "clicked" method on line 15.
Feel free to remap it to different keys depending on layers, like the turns are done.

View File

@@ -22,7 +22,7 @@ You will need to upload the "gerbers" on the frontpage of jlcpcb.
![JLCPCB](images/orderingguide/jlcpcb.png)
You should see a thumbnail of it afterwards. Defaults are fine, but you might consider
lead free HASL(ca 1usd more expensive).
lead free HASL(ca 1usd more expensive).
You probably want to consider a different color than the default green.
This is completely up to you, there is no price difference, the only thing
@@ -45,7 +45,7 @@ much, I know other people do, and it doesnt cost much extra).
For a hotswap build(meaning you can replace switches without soldering),
you need to order hotswap sockets, and you should probably use a plate, or a case,
to keep swtiches from falling out accidentally. The old v1 plate will do, but
to keep swtiches from falling out accidentally. The old v1 plate will do, but
several people(including myself) are working on plates and cases. Stay tuned.
Buying from AliExpress is a bit of an art in itself. You need to do your
@@ -56,7 +56,7 @@ of unserious actors.
For my own part, I have good experience with the new "Choice" options,
where you get free shipping on > 10usd orders. A few times I ordered
none choice-options and had problems with VOEC clearance, so I had to pay
none choice-options and had problems with VOEC clearance, so I had to pay
extra taxes and a clearance fee, and it took way longer to ship.
These are the items I usually order:
@@ -106,7 +106,7 @@ blue clickys, and they ARE pleasant, but this is at home, and my wife is using s
I have ordered these, and liked them: https://www.aliexpress.com/item/1005006270820565.html
(Just tried the peach and silent cream, but have an order for the lemon ones in as well...)
If you want cheap,
If you want cheap,
You will need 36 switches per keyboard.
** NB: buy 5 pin switches!** One of the most important improvements of v2 of the Cheapino

View File

@@ -4,13 +4,13 @@
This can happen for 2 reasons:
### You used a charging only cable.
### You used a charging only cable.
Solution: Find a cable with data support.
### There is an issue with certain combinations of high end cables and computers.
Checkout this issue:
### There is an issue with certain combinations of high end cables and computers.
Checkout this issue:
https://github.com/tompi/cheapino/issues/78
and this reddit post for more info:
and this reddit post for more info:
https://www.reddit.com/r/ErgoMechKeyboards/comments/1fx67uz/cheapino_not_working_but_powers_on_with_usba/
Solution: Try a USB 2.0 cable(usually this just means "cheaper"...)
@@ -41,7 +41,7 @@ Check your soldering on both MCU and the RJ45 sockets. If there are any shorts,
Not all ethernet cables are the same... There are different variants more or less rare, for different purposes. The most common which will create problems for the cheapino is the crossover cable: https://en.wikipedia.org/wiki/Ethernet_crossover_cable
Try different cables, if one is working fine, this is your issue.
Try different cables, if one is working fine, this is your issue.
## Suddenly my cheapino outputs A LOT of random characters

View File

@@ -62,7 +62,7 @@
<a onclick="toggleAll(false);" href="#">Hide all</a>
<a onclick="toggleAll(true);" href="#">Show all</a>
<p>
If you are having problems with a row or a column, try to hide all others. When you only have the problematic columns or rows left, you can check all the highlighted solder joints.
</p>

View File

@@ -5,14 +5,14 @@ Probably one of the cheapest split keyboards you can build.
![V2 in case](doc/gallery/cheapino-in-case-9.jpg)
This is the result of really enjoying building keyboards,
but not wanting to spend that much money on it.
The pcb is reversible, connected using rj45,
This is the result of really enjoying building keyboards,
but not wanting to spend that much money on it.
The pcb is reversible, connected using rj45,
and utilizes a japanese duplex matrix, so only one
mcu is needed. For hotswap I recommend a case(pictured above),
but soldering the switches is of course the cheapest option :)
You want one?
You want one?
See the [ordering guide](doc/orderingguide.md) for what you need and how to buy it.
See the [build guide v2](doc/buildguide_v2.md) for more details and pictures of how to actually build it.