Tag Archives: Arduino

Using an Arduino with Python LESSON 5: Analog Voltage Meter in vPython

In this lesson we begin coding a 3D analog voltmeter model in vPython. We begin by connecting a potentiometer to an arduino to create a voltage divider. The voltage is read from the center tap of the potentiometer by the arduino, and then the arduino passes the data to python. Then, we animate the  analog voltmeter based on the readings passed from the Arduino. Enjoy!

Then this is the code we developed for the Python side.

 

 

Using an Arduino with Python LESSON 4: Visual Display of Measured Voltage in Visual Python

In this lesson we show how you can measure a voltage from a potentiometer using Arduino, and then pass that data to Visual Python over the serial port. Then we use visual python to create a 3D model that is animated by the live data.

On the Arduino side we use the following code to measure the voltage from the potentiometer:

Then on the python side we read and display the data with the following code:

Watch the video for a complete explanation of the code.

Robotics Training LESSON 10: Using the Infrared (IR) Remote to Control Robot

In this lesson we show how to use the IR remote in the Elegoo Smart Car to send signals to the robot. The IR remote sends IR signals to the IR detector on the Electronic Shield sitting on top of the Smart Car. In this lesson we show how to install the IR library, and how to write code to send and detect IR signals. The code we develop in today’s lesson is included below for your convenience.

 

Robotics Training LESSON 1: An Introduction to Robotics for Absolute Beginners

It is time for you to begin to put all the things you have learned about the arduino together into a practical application. In this series of lessons we will show how to apply what you learned in our most excellent arduino lessons to use. We will be building and programming the Elegoo Smart Car. If you home gamers want to play along, you can grab your gear HERE.

Arduino Tutorial 66: Controlling DC Motor, Speed and Direction with a Remote

IR Control DC Motor
Circuit for IR Remote Control of DC Motor

In this lesson we develop a project that allow Remote Control of the speed and direction of a DC Motor. We use an Arduino Nano, and components from the Elegoo Kit. Also, to facilitate a clean build, we use Straight Jumper Wires.

The motor is connected according to this schematic:

DC Motor Controller
Connection Diagram for a DC Motor Controller using the L293 Control Chip

Also, the remote control receiver is connected as follows: R on Remote to 5V, G on Remote to Ground, and Y on the Remote to Arduino Digital Pin 9. Go back and check out Tutorial 65 if you need more details on the Remote Module Connections.

In this video we will take you step by step through the build and coding for the project.

The code below is the software we developed in the video.