Raspberry Pi to Arduino connection bridge experiment – DC Motor

I’ve been doing some experimentation with the Cooking Hack Raspberry Pi to Arduino connection bridge for the upcoming book.

Here is a quick sneak-peak of an experiment I conducted when testing out some of the hardware.

The video below shows a combination of a Raspberry Pi, the Cooking Hacks shield, an Arduino motor-shield  a small DC motor and a circuit consisting of a resistor and photo-resistor.

The software in the background is processing the feedback from the photo-resistor and deciding when to turn the motor on and off, and in which direction. This software also generates the necessary PWM for the motor.

In the video I cover the photo-resistor to turn the motor clockwise and then uncover it to turn it counter-clockwise.

Enjoy!

P.S Thanks to Andy C on the Cooking Hacks forum for pointing me in the direction of using C threads for PWM.

One thought on “Raspberry Pi to Arduino connection bridge experiment – DC Motor

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s