Arduino Code – Logging

Needing to write output to the Arduino IDE’s ‘Serial Monitor’ is something you might find yourself doing a lot. It’s one of the easiest ways of giving feedback on variables, and is invaluable when it comes to debugging.

To output content you can use code like this:

Serial.println("Hello world");

All good so far. How about if you want to output a variable? That’s slightly more work…

Continue reading “Arduino Code – Logging”

Useless Box – The Code

The Code

For anyone planning on making their own ‘Useless Box’, you might find my Arduino Sketch(/code) useful as a starting point.  The version I’m using here is not my final version, which adds more ‘character’ at the expense of code readability.

You’ll have to tweak the fingerMin/fingerMax and lidMin/lidMax values to suit your own designs, but hopefully that should be quite straight forward.

If you find the code useful, or develop or further, please let me know!  It would be great to see others getting some benefit from it!

Continue reading “Useless Box – The Code”

Useless Box – Final Result

Here it is – The final result!

Powered using an Arduino Uno, two ‘reclaimed’ servos, and a handful of Lego blocks.  Great fun to make, a good starting project for people interested in Arduinos, and a lot of fun to use!

Useless Box – Nearly Finished!

Getting Close

Another evening of ‘I Made A Thing’-ing, and I’m happy with the results.

I’ve used a ‘ProtoShield‘ to help tidy up the wiring.  I’d recommend anyone to check them out, especially if your soldering skills are a bit rusty.


These slot straight onto the top of your Arduino, but can easily be removed if you need the Arduino later on for other projects – Without you needing to remove all your wires! Very handy.

Continue reading “Useless Box – Nearly Finished!”

Useless Box – The Finger (Pt 1)

The Finger

So I’ve got a rudimentary ‘box’ built, and I know how to control the servos with an Arduino.

I figured the next step is to work on the ‘finger’.  The design evolved through trial and error, with a goal to Keep Things Simple.  There’s some cool and very clever implementations a Google search away, but I worked my own design out using Brains.

The photo here shows my initial design – A basic ‘C’ shape constructed (again) from Lego.  The 90 degree joints are fairly strong, but I suspect in the long term I’ll be reinforcing them somehow.  Superglue is always an option…

Continue reading “Useless Box – The Finger (Pt 1)”

Useless Box – Lego Time

Designing The Box

When it came to the box I was in two minds – Either I make it in wood, or Lego.  (Give me a few months and ‘plastic’ would be an option – But I’m waiting until I buy a 3D printer…)

Wood has a certain charm, but Lego is much easier to work with and adds a nice ‘retro’ feel.

The design is simple, as you can see…

For now I’m leaving a hole in one side, allowing easy access without having to go through the top.  I don’t know how tall the walls need to be (I’ve got to fit a couple of servos, a ‘finger’, and an Arduino in there yet!), so it’s all a bit ‘prototype’.

Good enough for now though!

Useless Box – The Servos

Servos

Getting a servo to move is a bit more complicated that getting an electric motor to spin, but not much so.

Servos are typically limited to being able to rotate 180 degrees, which means it’s not just a simple case of applying a voltage to make it ‘spin’.
Instead the Arduino can send a ‘pulsed’ signal to the servo which governs the position.  There are many articles out there describing how to do this, but the Arduino servo library has excellent documentation and clear steps on the basics.

Thankfully the basics is all I need.

Continue reading “Useless Box – The Servos”