Categories
Uncategorized

Blink Without Pause on the micro:bit

If you’ve ever used an Arduino there’s a good chance you started with the Blink sketch, which is a great introduction to programming a physical computing device where you can see the outcome in the form a blinking LED. As you learn more and things get complex, you discover that using the delay statement in your code is not ideal as it prevents the code from continually running, so you can’t properly capture input to your microcontroller. There’s more over at the Blink Without Delay tutorial on this topic.

I’ve been doing a lot with the micro:bit lately, and my quick searches gave no equivalent for Blink Without Delay so I created Blink Without Pause.

The tutorial starts with micro:bit code for Blink With Pause (which is really just Blink) and then Blink Without Pause so you can compare the two.

For a real-world example there are two more, Blink With Pause With Button and then Blink Without Pause With Button which should clearly illustrate the value of not using pause if your code needs to do other things.

Oh, if you’re wondering where the micro:bit is in the illustrations above… it’s not there! The diagrams show the Bit Board that Brown Dog Gadgets will be releasing this fall as part of a Kickstarter campaign. Follow on Twitter, Instagram, or Facebook to see some of the other projects we’ve been doing and find out when the campaign launches.

Categories
Uncategorized

Vinten Tripod Leg Lock

I was doing a video shoot with Ben Nelson for Brown Dog Gadgets last week and I noticed his Vinten tripod leg had an issue staying locked in place… Seems one of the leg lock pieces had broke in half. It seemed liked a perfect reason to fire up OpenSCAD and get the 3D printer spitting out a new part.

In the photo above you can see the new part in silver, and the two original parts on the other legs, in black.

It took two prints to get an acceptable fit. The first was a little too wide and wouldn’t quite fit in place. I tweaked the file just a bit and the second version worked well. I’ll walk through the process a bit below.

For an organic shape like this I usually start by putting it on a desktop scanner to get the profile. This one is curvy, and I’m not big on drawing curves in OpenSCAD, but I am big on scanning in an object and then tracing it in Inkscape. I did a few scans and even then I edited the image a bit to adjust the contrast.

I import the images into Inkscape, each layered directly on top of each other, then add another layer on top of that to do the drawing. I can then easily switch out the image below and compare things. For a symmetrical drawing like this I really just need to draw half of it, then I just dupe and flip to make the other half and combine them into one.

Once I have a vector file created I export that and then import it into an OpenSCAD file where I can extrude it changing it from a 2D shape to a 3D shape. Creating a solid object is the goal. Once I’ve got a solid object I can start knocking holes in it and adding angles by subtracting with various shapes. (The reddish parts are all subtractions or differences from the main piece.)

And yes, the above image does appear to be some sort of special forces TIE Fighter from the Star Wars universe.

Here’s our final piece, ready to be rendered, sliced, and printed. The original part had some pockets on the top and bottom, but since they were not required for functionality I left them out.

Ben installed it and briefly tested it and it seemed to work, though time will tell if it holds up under stress. (Also, this one is PLA so if he leaves the tripod in a hot car, it might soften and fail.) I’ll probably print a few more for him to keep in the tripod bag in case this one does fail in the field.

If you want to print one of these, you can grab the file from Vinten Tripod Leg Lock and have fun!

Categories
Uncategorized

Reprogramming an ATtiny85 Blink/Fade Board

A few years ago I helped Josh with the code for the Blink/Fade Board that Brown Dog Gadgets has in their Crazy Circuits kit.

This is a simple board that comes preprogrammed to do a few specific things, with the idea that you can start using it even if you don’t know how to program or upload code to a controller. Besides power in, ground, and reset, there are five GPIO pins that we can use:

  • Pin 0: fades in and out
  • Pin 1: heartbeat
  • Pin 2: twinkles randomly
  • Pin 3: blinks on and off
  • Pin 4: blinks off and on (alternates with Pin 3)

We’ve always said that expert users could reprogram it to do anything an ATtiny85 can do, but we never had a guide… until now. Courtesy of Brown Dog Gadgets here’s the Guide to Reprogramming a Blink/Fade Board!

We’re using the Arduino IDE along with a SparkFun Tiny AVR Programmer to do the heavy lifting… You’ll also need to build a little LEGO jig with some Maker Tape and Crazy Circuits components and some Dupont jumper wires to string it all together.

After I reprogrammed the board I popped it out of the programming jig and popped it into a simple circuit to control the brightness of an LED with a potentiometer. You can’t do too much with an ATtiny85 but it does have a few inputs & outputs and you can even control a NeoPixel strip with it! (A guide for that will be coming soon.)

Like most of the guides we do there are some nice diagrams and downloadable PDF files with more/helpful info. Here’s one covering the reprogramming aspect of the guide…

And here’s one that shows using the reprogrammed board in the LED/potentiometer circuit. (The code for BFDimmer is available.)

I’ve been doing my best to keep cranking out fun and educational guides for projects. While a lot of them have been focused on simple circuits or Arduino-based things, we’ll be expanding into Micro:bit projects in the coming weeks, which has definitely been interesting.

Categories
Uncategorized

SparkFun Multimeter Detent Repair

I’ve got two of these SparkFun Multimeters, which is a good basic meter for the price. I’ve had them for years and they’ve worked well… except for one thing. Every now and then the detent fails and the dial still turns fine but doesn’t click into place. It’s a minor annoyance, but life is full of minor annoyances. Since I had to fix it again today I figured I’d write it up so I remember how to do it next time, and others might also find it useful.

There are three screws to remove to open it up. One small one for the battery compartment, and two holding the case together. Get a small Phillips head screwdriver and get to it.

There are four screws holding the circuit board to the front of the enclosure. Sorry, this is the best photo I have. Look for the screws, you’ll find them.

The front half of the enclosure has the dial in it. Lift it out… oh wait!

At this point I should have mentioned that if you hear the tiny metal ball rolling around inside the meter you should carefully open it so you can capture it and it does not roll away. It’s tiny! There’s also a tiny spring you’ll want to find. That’s pretty important.

Oh, look! There they are. Now, there’s a good chance there should be two balls and two springs, but I probably lost a pair long ago. No matter, let’s keep going… If your spring and ball are nowhere to be found, look on the floor.

Okay, there’s a pocket in the front of the enclosure where you place the spring and then the ball. There are two pockets, one on each side of the dial. As mentioned, I only have one spring and ball at this point. Argh…

Yeah! Back in place… carefully put the dial in place, then reassemble in reverse order you took it all apart, and it should be good. Again, this post is mainly for me the next time I need to do this since I stared at the whole thing for five minutes before I remembered how it all goes. Good Luck!

Categories
Uncategorized

Game Boy Camera

I remember seeing people use a Game Boy Camera years ago, and with my interest in lo-fi tech (and probably spurred on by 8bitMKE) I ordered a Game Boy Camera for $11.97 on eBay almost two years ago (Hey, sometimes projects take a while.)

Last fall when my daughter moved out we found her old Game Boy Advance, and after a good five minutes of Tetris I popped the camera into it and took a few photos. But alas, with no way to transfer them out of the Game Boy, they were stuck there…

After some digging around I found some posts that mentioned using an Arduino to transfer the photos from the Game Boy to a computer. Arduino you say? That’s my jam! But even then it took some time before I did anything.

I finally got the cable I needed (a “Two Player Link Cable Cord for Nintendo Game Boy”) for $3.99 on eBay after first ordering the wrong cable, and I quickly grabbed an Arduino Nano, one of my breakout boards that was already soldered up, cut the cable in half, stripped the wires, grabbed a multimeter to figure out which was which, and got it all wired up.

The arduino-gameboy-printer-emulator repo on GitHub proved the most useful to me in getting this all set up.

The process to transfer involves connecting the Game Boy and “printing” the photo you want while the Arduino serial monitor is open and set 115200 baud. The data will flow into the serial monitor window, then you copy it and paste it into the decoder and you get your image.

While I’ve got a DSLR, a phone, a Raspberry Pi camera, and other ways to capture images, the Game Boy Camera is definitely one of the more esoteric methods of doing so. Stay tuned to see what I actually do with it.