Legocam: My Lego webcam from 2000, working on a modern Mac

(blog.benjamin.ie)

28 points | by benkelly 2 days ago

9 comments

  • asdfsa32 2 hours ago
    So this is how it is going to be? AI written everywhere?

    > I read that driver and copied the protocol: which registers to write, in which order, to wake the sensor up and start streaming.

    > legocam is GPL-2.0, like the driver it learned from.

    Please write yourself.

    • andai 2 hours ago
      Well, it makes sense that the author of the driver should write about it.
    • theoctopus 2 hours ago
      Not the first time I've seen this, but this one really hit me for some reason.

      I genuinely don't understand why someone would want to work like this. There's obviously no practical use in having a 26-year-old novelty webcam work at 5fps. What made it interesting was the process of figuring it out and writing it up, which others could then read and learn from.

      Instead it looks like this 'author' just watched an LLM code it and write up for them, and published it unedited. What is anyone getting out of this completely soulless process?

      • areoform 27 minutes ago
        I think it's a good thing, because using a LLM like this is the first time most people have used a computer as a computer. It's the first time people have actually made something via an intermediary that executes on their computer as opposed to installing an application built by a developer.

        In so many ways, LLMs are the computer revolution realized. A lot of people just don't know how to write a driver, what it is, or how to investigate this. I certainly wouldn't. Nor would a lot of trained mathematicians and scientists. It's not immediately obvious how you'd tackle a problem like this to them and it creates this feeling of learned helplessness.

        Now, thanks to the age of magical machines. This person wanted a piece of their chidlhood back and voila, they did and now can share it with the world if they so choose.

        I do think that people should get better about attributing the machines though. I wouldn't be comfortable claiming ownership or authorship over code written by a machine entity so I do my best to mark machine-authored code as machine authored code.

        An example, I know about snell's law and a little bit about optics. Nothing beyond the standard undergrad stuff (right now). I've tried Apple's liquid glass and I didn't like it. I think a part of it is that it's not translating the physics well and most implementations fall flat. It sort of either exaggerates or doesn't. Two nights ago as a passing fancy, I decided to work with codex and gpt to make it into a library that I can use for a larger research project. https://github.com/areoformed/daphnis-glass https://as-we-may-think.halfdrop.workers.dev/examples/as-we-...

        It made me happy to watch a machine go off and do checks + validate the equations I gave it and to watch it write,

            > The numerical checks agree with the central magnification limit and your rainbow equation. An important consequence for the UI is already clear: the distance between the drop and the page can change both magnification and orientation. “Refraction strength” alone won’t describe the effect.
        
        But as I did nothing more than write up a bit of insight, prod the machine, and make a detail request, I made sure that the machine entity got attribution for it, "Developed by Codex in collaboration with areoform. MIT licensed."

        I wouldn't have been capable of turning that insight / thought process into code before, but thanks to the machines now I can, and I can even share it under a permissive license so that other people can find some small joy in it?

        Is it soulless? Perhaps. But consider this, I found joy in turning a passing thought about physics into something that tangible that I can use for myself. That wouldn't have been a possibility for me in November 2020.

    • haritha-j 2 hours ago
      > It runs at about 5 frames per second. That's the limit of USB 1.1 and the sensor clock, not the code.
    • lloydatkinson 2 hours ago
      I agree. For basically two or three short paragraphs too...

      When I scroll through someone's personal blog and every single post is AI written I get that AI nausea/fatigue feeling.

  • lacop 1 hour ago
    > I clipped it onto my LEGO RC car base to make a spy car, and drove it around as far as the USB cable reached from my little Sony VAIO laptop.

    Neat. A few years ago I made a wireless version with more modern LEGO car and RPi camera. Great fun to drive around until the latency gets you stuck and you have to pry it from behind the sofa :)

    https://www.printables.com/model/343226-lego-42099-raspberry...

  • utopiah 2 hours ago
    Feels like a lot of current hacks are about how to overcome the limit of a totally optional software prison rather than be creative with what can be done with the unexpected combination of software and hardware.

    That's not actually progress but a regression due to walled gardens.

    Thanks for opening up ... but also why even get to such a bad spot in the first place?

    • soylentgraham 59 minutes ago
      It's not that hard to write a webcam kernel extension now, apple iirc provide a sample (but I think I based mine off someone else's implementation for passing buffers around to the sink)

      Here's mine, turning a kinect1's depth stream into a camera device

      https://github.com/NewChromantics/PopKinectMacWebcam

      So in this case, the hack is unneccessary, there is no limit of which you speak

  • boformer 2 hours ago
    Well done! It's crazy that Apple forces you to pay to sign your own software. Another reason to never buy any of their products.
    • andai 2 hours ago
      A nominal fee keeps out most of the Linux users.
  • Doohickey-d 3 hours ago
    Thanks to Linux, but also thanks to OBS's virtual webcam for being signed and allowing any arbitrary applications to push frames to it?

    That kind of makes Apple's signed camera extension requirement a bit useless, since any application that wants to be a camera, or wants to support some odball USB camera, could just ship the OBS one?

    Smells a bit insecure to me, but also helpful as a tinkerer...

    • MrBuddyCasino 2 hours ago
      Why did people flag benkelly’s reply? I don’t understand.
    • benkelly 3 hours ago
      Fair point. The OBS camera extension exposes a sink stream, so any local process can feed it frames. That's how obscam works without its own signed extension. I think the bigger protection is the system extension approval and the camera permission prompts in each app, but it does make the signing requirement feel thin. Without it, I couldn't have shipped this with a free developer account.
    • rf15 3 hours ago
      > That kind of makes Apple's signed camera extension requirement a bit useless

      It also makes me question of how much in good faith that requirement was made in the first place, or if it's just there to make more money for Apple & Friends.

  • buibuibui 2 hours ago
    Next project: Use Game Boy Camera as a Webcam
  • andai 2 hours ago
    Nice! Can you record some video with it?
  • Jolter 3 hours ago
    This person is still running macOS 15?
    • benkelly 3 hours ago
      Guilty! It's an Intel MacBook Pro, and I haven't got round to upgrading it yet.
  • mococa 3 hours ago
    What's the typical usage of a Lego's webcam?
    • benkelly 3 hours ago
      It came with the LEGO & Steven Spielberg MovieMaker set, so stop motion was the idea. As a kid, I clipped it onto a LEGO RC car and drove it round the house as a spy car, as far as the USB cable reached. :)
      • andai 2 hours ago
        Oh that's awesome. I made some stop motion films as a kid, using a webcam and some freeware on Windows.

        I had a bunch of play-doh, but no art skills, so it ended up being 100% blob monsters.

      • mococa 3 hours ago
        Cool!
    • christkv 3 hours ago
      Stop motion animation of your little lego adventures.