Raspberry Pi LESSON 13: Set Color of RGB LED with Push Buttons

In this video lesson we show how you can use pushbuttons and PWM (Pulse Width Modulation) to mix colors and create any color you want in an RGB LED. We are using the most excellent Sunfounder Ultimate Raspberry Pi kit, which you can snag HERE.

You will need to start by connecting up the following circuit. You will find all the components you need in the Sunfounder kit.

RGB LED on Raspberry PI
Circuit Diagram for connecting an RGB LED to a Raspberry PI

You can click on the circuit diagram for a bigger view. In the video above, we explain in detail the coding but for your convenience, we include the finished code below:

 

 

Using an Arduino with Python LESSON 17: Controlling Paddle Position with a Joy Stick

In this video lesson we show how to control the position of a game paddle in Python using data from a joystick controlled by Arduino. the data is passed from Arduino to Python, and then the position of the game paddle is dynamically adjusted in real time. On the arduino side, this is the code which we developed:

And on the Python side, this is the code which we used:

 

Using an Arduino with Python LESSON 16: Connecting and Using a Joystick with Arduino

 

In this video lesson we are working towards creating a 3D version of the classic Pong arcade game. In this session, we show how to read data from the joystick using the arduino.

The arduino code developed in this video is included for your convenience below:

 

Also, this is the vPython 3D simulation we have developed thus far:

 

Using an Arduino with Python LESSON 15: Model of Bouncing Marble in 3D Room

In this video lesson we model a 3D room, and have a marble bouncing around in the room, off of each of the six walls. Below we include the code we develop in the video above

 

Using an Arduino with Python LESSON 14: Model a Moving Marble in a Room Using Parameters


In this lesson we show how to model a moving marble in vPython. We show how to create an animation where the marble bounces off the left and righty walls of our virtual room. For your convenience, we include the code below:

 

Making The World a Better Place One High Tech Project at a Time. Enjoy!