Buddy's Homepage!

About Me
Fun Stuff


January 23, 2022:
I've been working sporadically on a new Arduino-based project -- DrawBot!
The general idea is to have a device which takes a picture of you and then draws it on paper. Not like a printer, but rather drawing just an outline.

Last year I spent time getting my ov7670 camera module working. There's a few places with existing code on the internet, but I couldn't actually get any of them working... so instead I spent a lot of time reading the ov7670 and Arduino datasheets, tracing through the code I found, and finally getting it to work! Yay!
Monochrome photos weren't too bad... but getting colour pictures took me a while longer to figure out. The problem wasn't actually my code per se, but had to modify the clock rates to transfer double the data (as compared to monochrome). Finally figured it out though!
Instead of just streaming the photo back to my computer, I then needed a way to store the picture, so I bought an Adafruit FRAM breakout and wrote the data to that! I also expected that to be super easy but at first it didn't work at all... eventually I found the problem to be that their test code assumes 2 byte addresses, but with the larger FRAM it needs to be initialized to 3 bytes (the Adafruit site has a way to submit suggestions and they have since updated the tutorial!)

January 24, 2022:
Before I had the camera working I was doing some prototype work on the edge detection portion in a super janky Swift desktop app I whipped up (and my first Swift app). Tried doing a bunch of fancy edge detection, various blurs, smoothing, automatic exposure adjustment, etc in the prototype app, but wasn't too happy with the results... plus it was super slow even on my decade-old Macbook, so I could only imagine how slow it would be on an FRAM-backed Arduino program. Instead I tried a super basic horizontal-only "is pixel difference %gt; X" edge detection and it turned out Good Enough!
January 25, 2022:
To actually do the drawing I would need something that moves.... not something I've really done before. I did a bunch of random research on the Internet, but it was a bit hard to know what it would actually feel like. This was one of the few times the pandemic really impeded me as I couldn't just go to a store and see what the different options feel like (though I don't even know what store I would go to for that?).
Anyhow I settled on some 2040 V-slot rails, couple gantries (small and large), power supplie, a couple stepper motors (and motor drivers), and other miscellaneous parts (screws, connectors, etc).
... fast forward a lot...
September 15, 2023:
I had the two main pieces working separately for a while now: the plotter portion hooked up to an old Arduino Uno, and the camera + memory working on a new Arduino Mega. Today I finally got around to moving the plotter portion over to the Mega, so now everything can be controlled from the one board! While remembering how the mess of wires worked, I also took some time to add some labels to help me keep track of things in the future. Next up will be integrating the software (and lots more wiring clean-up).
Copyright © 1999-2013 Morgan "Buddy" Betts