Live data from Hacker News

Ask HN: Most interesting tech you built for just yourself?

news.ycombinator.com

641–650 of 1001 posts

Re: Ask HN: Most interesting tech you built for just yourself?

#641
OOOH I've got one - I made a short script that lets me play any video on any site at arbitrary speed (speed controlled by arrow keys).

//@ts-check window.kVideoSpeed = 1; window.initialVolume = 1;

NUMPAD_3 = "99" NUMPAD_2 = "98" NUMPAD_6 = "102" NUMPAD_5 = "101"

UP_ARROW = "38" DOWN_ARROW = "40"

let timeoutId = null; document.onkeydown = (e) => { if (!document.querySelectorAll("video").length) { // no-op for pages with no videos return; } window.initialVolume = document.querySelector('video')?.volume || 1

    let myDiv = getOrMakeDiv();
    e = e || window.event;
    let KEYCODE = e.keyCode;

    // NOTE: can't use left/right b/c those go forward/back 10s on some sites
    if ((KEYCODE == UP_ARROW || KEYCODE == NUMPAD_6) && window.kVideoSpeed  1) {
        // down arrow
        window.kVideoSpeed -= 0.5;
        myDiv.textContent = window.kVideoSpeed;
    }
    for (let el of document.querySelectorAll("video")) {
        el.playbackRate = window.kVideoSpeed;

        // prevent volume from changing
        setTimeout(() => {
            el.volume = window.initialVolume
        }, 100)
    }
    if (timeoutId) {
        clearTimeout(timeoutId);
    }
    // set timeout to remove div
    timeoutId = setTimeout(() => { myDiv.remove() }, 1000);
}; function getOrMakeDiv() { if (!document.getElementById("myDiv")) {

        let div = document.createElement("div");
        div.id = "myDiv";
        // add styles to div
        div.style.padding = "8px";
        div.style.textAlign = "center";
        div.style.fontSize = "16px";
        div.style.position = "fixed";
        div.style.fontWeight = "600";
        div.style.border = "1px solid yellow";
        div.style.color = "white";
        div.style.backgroundColor = "black";
        div.style.zIndex = "999999";
        // insert div at the top of the body
        if (document.fullscreenElement) {
            document.fullscreenElement.prepend(div, document.fullscreenElement.firstChild)
        }
        else {
            document.body.insertBefore(div, document.body.firstChild);
        }
    }
    return document.getElementById("myDiv");
}

Re: Ask HN: Most interesting tech you built for just yourself?

#644

Every night, at 3 AM, my cat will meow and paw at the bedroom door like a banshee. I tried everything to get him to stop, including the off-the-shelf air sprayers that trigger with motion. Eventually, I decided to build my own. I 3D printed a case and trigger for an air sprayer can, created some electronics with an ESP32 and RF trigger, and wrote my own "motion detection" logic - this time with an ultrasonic sensor,…

In all my previous houses I just cut a hole in the door. $50s from a big box store for the proper door and a jig saw. I think they even sell templates you can attach to the door to make them more seamless.

But also I'm not trying to keep the cat out so there's that. I just like the door closed

Re: Ask HN: Most interesting tech you built for just yourself?

#645
post #472

Oh, I think I have a good one. I had an HP-25 calculator as old as myself, and couldn't use it. The original battery pack contained two sealed NiCd cells, which obviously failed many years ago. Most people replaced their NiCd cells with new ones, then with NiMh cells, or even alkaline AA batteries. This was always problematic: newer batteries were slightly larger and never fit well. Also, the power consumption of a c…

My HP-29C could use something like that. I have it on the shelf beside me I use AA batteries and the seem to have both a good shelf life but I do now about life span because I don't use it much but when I do it still works.

Re: Ask HN: Most interesting tech you built for just yourself?

#646
This wasn’t terribly hard, but I built https://seattle-movies.innocence.com/ because I really wanted an aggregate indie movie theater calendar. Then I added an RSS feed cause someone asked for it. It has vastly improved my quality of life around movies!

(I’m a hack but the code is as general purpose and adaptable as I could make it, just in case someone wants to use it for another city.)

Re: Ask HN: Most interesting tech you built for just yourself?

#647
Our house has a commercial style HVAC system. The controllers for everything (relays) are very simple. The run on a protocol called BACNet that is unauthenticated and pretty straightforward.

I was able to read in all the data points and then use the weather forecast and a few other data points to make changes to my HVAC system. The comfort different has been very drastic. Our house doesn't overheat on hot days and doesn't get cold fast when the temperature drops. (I am in the Northeast where there are big swings).

Re: Ask HN: Most interesting tech you built for just yourself?

#648
I had a servo motor attached to a raspberry pi which turned a small gear that connected to a plastic gear m on the analogue temperature control of my gas heater.

Then I had it switch to various temperatures while heating and also had a geofence for my phone implemented that turned on the heating when I entered a 500m radius. Even had a calibration script for the servo motor.

Re: Ask HN: Most interesting tech you built for just yourself?

#650
Throwaway time!

I built a custom smart motorized masturbator.

It borrows from 3D printer design, and has a NEMA 17 stepper motor driving a 2GT belt loop around a short length of 2020 extrusion to slide a carriage along a linear rail. The carriage has attachment points that I've put clamps on, that close around a fleshlight-style sheath. There's a brace at the business end that you put around the base of the penis and it keeps everything aligned.

All the parts are custom-designed and 3d printed.

It has an outboard control box that contains:

  - an ESP32-based microcontroller with a small OLED screen. 
  - a clickable rotary encoder that is the single input control
  - a TMC2209 stepper driver
  - 12v power input and a buck converter to feed the esp32
  - 12v output ports for 2 additional vibrators and an an H-bridge module to control them
The simple UI allows full control over the motion:

  - stroke duration
  - stroke amplitude
  - offset from the 0 position
  - motion path (just sinusoidal vs triangle wave so far)
The controls also allow control over the secondary vibrators for intensity, rhythm, and duty cycle.

It's been evolving for a couple years now and it works brilliantly!

Post reply on HN