Skip to main content

Posts

Hercules Motor Controller Library Reference Guide (Controlling the DC Motors)

This guide is not intended to be a tutorial on how to setup the Hercules Motor Controller (HMC) and install its library. If you need help with that, please visit the following link: CLICK HERE (^_^) First, we will need to include the Hercules Motor Controller library so we can use its functions to control the DC motors connected to the HMC, please add #include <Hercules.h> to the top of your source code like in the picture below: To control the motors, we will be using a function called 'MOTOR' followed by an action: To Initialize the DC Motors, we write: MOTOR.begin(); To run them: MOTOR.setRun1(); MOTOR.setRun2(); where setRun1 will run the motor(s) connected to the terminal M1 and setRun2 will run the motor(s) connected to the terminal M2 To stop them: MOTOR.setStop1(); MOTOR.setStop2(); where  setStop1  will stop the motor(s) connected to the terminal M1 and  setStop2  will stop the motor(s) connected to the terminal M2...

How to Connect the Hercules Dual 15A 6-20V Motor Controller, Load its Library and Program it

The Hercules Motor Controller Board First, if you don't have the Arduino Integrated Development Environment (IDE) installed, please download and install it from this following link: https://www.arduino.cc/en/Main/Software Once you go to the link above, scroll down to the following section: If you are using a  Windows PC, click on Windows Installer link  for fast and easy installation process.  If you are using  a Raspberry Pi , click on the Linux ARM link. For other Linux distros (Ubuntu, etc...) use either Linux 64 or Linux 32 depending on what operating system you have installed. Second, download the software library provided by the manufacturer. Don't use the link on the official website of the product as the library there doesn't work. Instead, use the one on github. Here is the link:  https://github.com/Seeed-Studio/Hercules_Motor_Driver Once you open the link above, click on 'clone or download' then 'Download Z...

L298N Motor Drive Controller - Reference Guide

Navigation - L298N Quick Reference Guide: IN1 and IN2 = Right Motors IN3 and IN4 = Left Motors ENA and ENB = controls the speed of the right and left motors via PWM. ENA or ENB IN1 or IN3 IN2 or IN4 Motor Action 0 X X Stop 1 0 0 Brake 1 0 1 Forward 1 1 0 Backward 1 1 1 Brake Connection on the Arduino:  Pin Connection L298N Arduino Microcontroller ENA 10 (~PWM) ENB 5(~PWM) IN1 9 IN2 8 IN3 7 IN4 6 Car Movement Directions vs. Wheels Rotation Car Moves Forward Car Moves Backward Car Stops Car Turns Left Car Turns Right Left Wheels\Motors Forward Back Stop Back Forward Right Wheels\Motors For...

Write a C Program to Determine the roots of the quadratic equation (ax^2 + bx + c = 0) [Code and Explanation]

Determine the roots of the quadratic equation Using the well-known quadratic formula Allow for the possibility that one of the constants has a value of zero, and that the quantity is less than or equal to zero. Test the program using the following sets of data:

Write a C Program That Requests an Integer Value from the User. (Code and Explanation)

Write a C program that requests an integer value from the user. If the value is between 1 and 100, print “OK;” otherwise, print “Out of range”.