Sunday, June 29, 2014

Raspberry Pi Streaming Video

Before I forget:  Before a few days ago, I did imaging through the Raspberry Pi camera the following way:

I'd drive the robot a few feet.  Then I'd send a command to take a picture.  A picture would be sent back to me, and I'd take a look at it.  Then I'd dismiss the picture, and drive the robot a little bit more. And so on.

Tedious.

The whole thing was done via Python.  I couldn't figure out how to do streaming via Python.  So, following streaming instructions here, I set up streaming video via the from the Raspberry Pi camera to a web page.

Now, I get a live stream of the camera as I drive the robot, making it a more fun driving experience.

Unfortunately, it seems to have hosed the picamera Python library, so I don't have access vi Python.  Oh, well.  For now, I don't need or want it.  I'll have to see about reinstalling it or making it live side-by-side with streaming, if possible, if I want it back in the future.

Wednesday, June 25, 2014

Stepper motor arrived

Okay, the new stepper motor finally arrived, and I tried out the sample code linked by one of the reviewers.  It works fine, but some of the output pins used by the code are also used by the Arduino motor shield to control the motors.  I'll have to find unused pins and rewrite the stepper motor code.  I assume enough pins are available.  If not...

Now that I have the stepper motor, I have to come up with a way of mounting the ultrasonic range sensor to the motor.  First, I already attached the stepper motor to the top-front of the robot platform by reusing the long standoffs.  I tried moving the Arduino and the Raspberry Pi to another location on the top plate, but the holes really don't seem ideal for anything.  I wish the top plate had more holes for screws.

For attaching something to the stepper motor, I'll probably order this shaft coupler and this 1/4" rod. Then I'll have to find a flat platform or circuit board that can attach via 1/4" ID shaft collars or something similar, and I'll attach the range sensor to that board and wire it up to the Arduino stack.

I'm so used to looking through the McMaster-Carr catalog when ordering parts at work, but for this project, I'm looking through Amazon.com.

Friday, June 20, 2014

Waiting

No, I haven't abandoned this blog.  My next step was to add a stepper motor so I could sweep the ultrasonic sensor in a controlled fashion before the robot, in order to get a map of objects in the front.

I ordered a cheap stepper motor from Amazon.com some time ago, but the delivery time is very long.  I should get it in a couple of days... I hope.