Category Archives: Arduino

Arduino Tutorial 41: Understanding Hexadecimal Numbers and Why They Are Important

In today’s lesson we discuss the topic of Hexadecimal numbers, and why they are important. As discussed previously, digital devices are nothing more than an incredibly large number of simple on/off switches connected together in clever ways to achieve useful functions. Since there is a need to represent numbers using only on/off switches, the binary number system is used. A switch that is in the on condition can be thought of as a “1” while a switch in the off condition can be thought of as a “0”. by stacking these switches side by side, we can represent almost any number by simply working with enough switches. As things got more complex, and the number of switches increased, it became untenable to keep up with all the 0’s and 1’s. Hence, groups of 4 switches were bunched together, and the Hexadecimal system was born. Understand Hexadecimal is simply a way to keep track of switches that is more convenient than the Binary system. This video discusses in detail, and gives lots of examples.

Arduino Tutorial 40: Controlling DC Motor Speed and Direction with Pushbuttons

In this lesson we explore how to control the speed and direction of a DC motor using two buttons. We are using the L293D motor controller and a small DC motor for demonstration purposes. We are using parts from our Elegoo Super Stater Kit, which you can get HERE. The basic circuit was explained in Lesson 37, and we are using that work as a starting point. The schematic below will get you started in connecting your circuit. Be sure and connect one of the Arduino ground pins to the ground rail in the second to the bottom row in the diagram below. It is good practice to connect all your grounds together.

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

The code we developed in the video lesson is shown below for your convenience.

 

9-Axis IMU LESSON 18: Visualizing Pitch and Yaw in Vpython

In this lesson we show you how to visualize Yaw and Pitch in Vpython. We create a visual representation of our breadboard, Arduino Nano, and BNO055 and then rotate it in three dimensions with and without pitch. For your convenience, the code we developed in this video are presented below.

 

Arduino Tutorial 39: Using a Joystick to Control DC Motor Speed and Direction

DC Motor JoyStick
This is a simple example of how to control speed and direction of a DC motor with a joystick.

Lesson 37 and 38 showed some preliminary concepts in controlling a DC motor using an arduino and the L293D motor controller. In the video above we show how to control the speed and direction of a simple DC motor using a joystick. In the neutral position, the motor is stationary. Then the speed smoothly increases as you move the joystick forward, until you reach maximum speed.

Lesson 37 and 38 showed some preliminary concepts in controlling a DC motor using an arduino and the L293D motor controller. In the video above we show how to control the speed and direction of a simple DC motor using a joystick. In the neutral position, the motor is stationary. Then the speed smoothly increases as you move the joystick forward, until you reach maximum speed. Similarly, in pulling the joystick back from the neutral position, the motor gradually increases speed in the reverse direction. The diagram below shows the basic motor control schematic we are working from.

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

In the circuit diagram above, we also add a wire to connect the arduino ground to the power supply ground. It is always good to have all components connected to a common ground rail. Of course, you also need to add the joystick controller as shown in the video.

This is the code we used in this