Arduino Question Currently Trying Make Self Balancing Robot Achieve Next Step Want Use Hc Q37116149

Arduino Question

I am Currently trying to make a self balancing robot and I haveachieve such but the next step is I want to use a HC-SR04ultrasonic sensor to dectect obstacles, my issue is that everytimeI try to implement new code no matter how small, the balancing ofthe robot will fail Or I will get fifo overflow, please help

Here is my code:

#include “I2Cdev.h”
#include <PID_v1.h> //Fromhttps://github.com/br3ttb/Arduino-PID-Library/blob/master/PID_v1.h
#include “MPU6050_6Axis_MotionApps20.h”//https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050
#include <HCSR04.h>
#include <NewPing.h>
#include <Drive.h>
#include <L298N.h>
MPU6050 mpu;

// MPU control/status vars
bool dmpReady = false; // set true if DMP init was successful
uint8_t mpuIntStatus; // holds actual interrupt status byte fromMPU
uint8_t devStatus; // return status after each device operation

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.