Category Archives: Portfolio

This script is written in python to perform EXFS corrections of digital photos. This script traverses the specified directory, stores all images, then performs the required transform to make the images display correctly.

#! /usr/bin/python
import time
import os
from random import randint
import pexif
from PIL import Image, ExifTags
photo_list = [] #List of all photo paths traversed by OS.WALK
for root, dirs, files in os.walk(“/yourpath/”):
        for file in files:
                if file.endswith(“.png”) or file.endswith(“.jpeg”) or file.endswith(“.jpg”) $
#                       print(os.path.join(root, file)) #Debug for path checking
                        photo_list.append(os.path.join(root, file)) #Add the current path+ph$
for photo in photo_list:
        #print(“Try this: ” + photo)
        img = pexif.JpegFile.fromFile(photo)
        #print(photo + “<- Path Orient ->   ” + str(img.exif.primary.Orientation[0]))
        try:
                image=Image.open(photo)
                for orientation in ExifTags.TAGS.keys():
                        if ExifTags.TAGS[orientation]==’Orientation’:
                                break
                exif=dict(image._getexif().items())
                if exif[orientation] == 3:
                        image=image.rotate(180, expand=True)
                elif exif[orientation] == 6:
                        image=image.rotate(270, expand=True)
                elif exif[orientation] == 8:
                        image=image.rotate(90, expand=True)
                image.save(photo)
                image.close()
        except (AttributeError, KeyError, IndexError):
        # cases: image don’t have getexif
                print(“broke”)

Learning to Build with Balsa Foam

I am learning how to build models that I can animate with an Arduino. After much exploration, I have decided on Balsa Foam. It is easy to shape, carve and customize. This article will help show you how I learned to build models with Balsa Foam.

 

The pictures below are the tools I have been experimenting with. The wood dowels were hand carved to be different types of brick and stone stamps. I press the sharp edges onto the foam to imprint a design. Traditional wood carving tools and a razor saw are also helpful.

Tools Overview Wood Tools

The pictures below are some examples of my work. The brickwork is a variety of press tools. The vase was created by turning a block in a Dremel like a lathe. I shaped it with sand paper and an Xacto knife.

Example Brick Work Balsa Foam Vase 

More to come later…

 

Arduino Powered Remote Control Robot

I have been working on a Arduino Powered Robot that could be remote controlled. (I will continue to update this with more detail). The video below shows the prototype robot working via the remote control. This article will describe how I built the Robot, the materials used, and the program that controls it.

Materials List

This project was completed with materials ordered entirely from Adafruit.com. If your not familiar with them, check out their excellent tutorials and supplies for makers.

 

The Remote Control

The remote is a BoArduino from Adafruit attached to a clear breadboard with an Analog Control Knob and a Xbee Series 1 transmitter. The wiring is pretty Simple for the remote. The control knob is wired to the analog pins on the BoArduino along with a +5V and a Ground wire. The Xbee is wired from the RX and TX pins to the Digital 3 and Digital 2 pins respectively along with a +5 and a ground wire. Some of the extra black wires in the picture hold my breadboard wires in place so they don’t pull loose and are not needed.

Xbee Remote 2    Xbee Remote

The Sketch below is the code for the remote. Feel free to download and modify it. Suggestions for improvement are also welcome.

Remote Control Sketch

 

The Wireless Robot

The robot is Arduino powered and Xbee controlled. A program waits for Xbee transmitted commands and then determines which of four continuous motion servos to actuate. The frame is composed of components from an Open Beam kit. The nice thing about Open Beam is that the plastic Arduino mounting plate slides into the sides of each beam. This creates a secure and easy electronics mount. Just place a beam of the appropriate length on each side and secure in place with the Open Beam corner brackets.

Robot_Front Robot_Rear

The picture below shows how everything is connected. The program expects the left side servos to be connected to Pin 4 and the right side servos to be connected to Pin 8. In the picture below, you can see that both servos on the left share the same +5v, ground, and control wire as do the servos of the right. Digital Pins 2 and 3 are connected to the Xbee pins to the TX and RX pins respectively.

Robot_Top

The sketch below contains the program to control the robot via wireless commands received from the remote.

Remote Robot Sketch

This is a work in progress. It was a fun little project and it is quite rewarding to create a remote controlled robot. I plan to add a remote control arm for simple tasks. What would you add to the robot? Thanks for reading. Good Luck building!

– Justin