It all starts with the bodywork. In this case it's a lamp found in the local thrift store. As most things, it needs some assembly before we get a good idea of what it is.
After a closer look, I have to say that the orange cap is a bit of a colour mismatch. However, it's not the end of the world, after sanding, priming and then painting it bright red, it does fit in perfectly.
Our nightlight needs some electronics to work, and those need to be attached somehow. We 3D printed a little platform, and using the side holes and some bolts we created a nice little nook.
It does look awesome, but it turned out to be a tad unpractical, so in all honesty, you can just duct tape everything to the inside..Electronics
With our spaceship ready, we move and the the electronics. The main bits are shown in the picture. and they have the following function:
- Raspberry Pi Central part of the logic, controls all the other bits.
- Adafruit CAP1188 Capacitive TouchIn combination with the copper tape it allows us to sense touch
- NeoPixel RingThe focal point of the project, lights up everything very nicely.
The above links each provide instructions on how to setup and/or connect the components. After this is done, we can run the code attached to this project. This is how it works:
- Check if the rocket is touched.
- If so, check the last state (on/off) and do the opposite. This means when it was already on, it will turn off, and vice versa.
- If no touch is detected, wait for a moment and check again.
Our last to do is attaching everything to the rocket. As mentioned before the original idea was to use a little internal platform. Just taping it to the inside turned out to be easier and more practical...Result
After adding some stuffed toy filling and popping in the little windows, our rocket nightlight is ready for lift off!
Apparently capacitive touch is super sensitive, you just need to hover your hand nearby, and it will pick you up. Unexpected, but it does add an extra layer of magic!
There is only one way to end a project like this, to say with great confidence: "To infinity and beyond!"