Thursday, August 31, 2023

raspberry pi pico w PICO_DEFAULT_LED_PIN not working

The led is not connected to a rp2040 gpio port but to the bluetooth module.

So the PICO_DEFAULT_LED_PIN in the blink.c example points to nothing and will never work on GPIO.

Tuesday, December 20, 2022

Quality long lasting tool list.

Makita chordless drills https://www.makita.co.jp

Panasonic Eneloop batteries https://www.panasonic.com (use slow charger bq-cc17)

Silky saws https://www.silky.co.jp  

Olfa cutters https://www.olfa.co.jp

Mitutoyo https://www.mitutoyo.co.jp/

Lindstrom precision cutters https://www.lindstromtools.com

PB Swiss screwdrivers https://www.pbswisstools.com 

Victorinox knives https://www.victorinox.com

Felco pruners https://felco.com

Dormer drills https://dormerpramet.com

SKF bearings https://www.skf.com/se


More tools:

Hewlett-Packard Voyager calculator series protective case HP-10C HP-11C HP-12C HP-15C HP-16C








cap();
body();

module cap(){
    difference(){
        hull(){
            translate([0, 0, 0])sphere(d=15.50+4,$fn=60);
            translate([88-15.5/2-17.5/2, 0, 0])sphere(d=17.50+4, $fn=60);
        }
        union(){
            hull(){
                translate([0, 0, 0])sphere(d=15.50, $fn=60);
                translate([88-15.5/2-17.5/2, 0, 0])sphere(d=17.50, $fn=60);
            }
            translate([-10, -15, 0])cube([100,100 ,30 ]);
        }
    }
}


module body(){
    difference(){
        hull(){
            translate([0, 0, 0])rotate([0,0,0])cylinder(r=15.50/2+2, h=127, $fn=60);
            translate([88-15.5/2-17.5/2, 0, 0])rotate([0,0,0])cylinder(r=17.50/2+2, h=127, $fn=60);
        }
       union(){ 
            hull(){
                translate([0, 0, -1])rotate([0,0,0])cylinder(r=15.50/2, h=129, $fn=60);
                translate([88-15.5/2-17.5/2, 0, -1])rotate([0,0,0])cylinder(r=17.50/2, h=129, $fn=60);
            }
            difference(){    
                translate([36.2,20,143.4-7])rotate([90,0,0])cylinder(d=38, h=50, $fn=6);
                union(){
                    translate([36.2,21,143.4-7])rotate([90,0,0])cylinder(d=37.8, h=52, $fn=6);
                    translate([36.2,21,133.4-7+0.5])rotate([0,0,0])cube([50,120 ,1 ],true);
                    translate([36.2,21,143.4-7])rotate([0,60,0])cube([50,120 ,1 ],true);
                    translate([36.2,21,143.4-7])rotate([0,-60,0])cube([50,120 ,1 ],true);
                }
            }
        }
    }
}

Thursday, November 10, 2022

HP Prime Keyboard repair

 My ".", "_" and "SIN" keys on the keyboard didn't click any more and where sunken away in the keyboard. Clearly not the quality of the HP Voyager ancestor.

Taking it apart was nicely explained at ifixit!

https://www.ifixit.com/Guide/HP+Prime+Graphing+Calculator+G8X92A+Button+Panel+Replacement/137052

The little points on the three key's where completely squashed. And a couple of them where comletely bend.

I wanted to bend some back with hot air at 160 degrees celcius with a hollow needle. This went extemely well! Even better, the hot air caused the little points, that where completely squashed, to spring back in it's original shape withouth any help! 

Only looks a little burnt, hope this hardens the points too.

It went so easy that i don't have any "before" photo's. 

Hope this can be of good use for anyone with this problem.









Friday, July 22, 2022

HBM Vacuum pump

Wednesday, May 11, 2022

Generate random characters withouth gremlins in python.

import os, random, string
length = 13
chars = string.ascii_letters + string.digits + '!@#$%^&*()'
random.seed = (os.urandom(1024))
print(''.join(random.choice(chars) for i in range(length)))

Monday, May 2, 2022

Batch crop pdf pages in half with ghostscript and merge into single pdf

Get the page size and crop to desired dimensions with CropBox:

hckr@hckr:~$ pdfinfo img_00217.pdf
Creator:        OmniPage CSDK 21
Producer:       Document Capture
CreationDate:   Mon May  2 09:49:51 2022 CEST
ModDate:        Mon May  2 09:49:51 2022 CEST
Tagged:         no
UserProperties: no
Suspects:       no
Form:           none
JavaScript:     no
Pages:          1
Encrypted:      no
Page size:      770.64 x 577.44 pts
Page rot:       0
File size:      156189 bytes
Optimized:      no
PDF version:    1.4

Thus 770/2. And the offset for the right side.

Make a script to split all pdf files in the folder in two halves, left and right:

Test and remove "echo" if it looks good.

 
 
#!/bin/bash
for f in *.pdf; do
   echo gs -o "${f%.pdf}-right.pdf" -sDEVICE=pdfwrite  -c "[/CropBox [385 0 771 578]" -c " /PAGES pdfmark" -f "$f"
   echo gs -o "${f%.pdf}-left.pdf" -sDEVICE=pdfwrite  -c "[/CropBox [0 0 385 578]" -c " /PAGES pdfmark" -f "$f"
done

Make executable

hckr@hckr:~$ chmod +x splitpdf

Run file

hckr@hckr:~$ ./splitpdf

Merge left and right files into output.pdf

hckr@hckr:~$ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output.pdf 
img_00217-right.pdf img_00216-right.pdf img_00215-left.pdf