Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

mjones11451

New Coder
Hi guys, I'm looking for some help. I saw this video
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
and I have the components necessary minus a few dials. Does anyone know how I could take that MPU 6050 accelerometer input and translate it to the servos so that when the car accelerates, the servos would wobble a little mimicking a real suspension? I've built the mechanical assembly and now I just need to code it. The goal is to get it to act just like in the video linked above. Any help would be great.

Thanks guys.
 
Geez that looks cool ... it would be good if that video had links to any existing source code, and we could take it from there.
... ah, that's an existing device that's not using Arduino: https://www.superscale2k20.com/ so I guess you're starting from scratch with the source code.
So you're using 4 servos? Have you figured out how those are going to be connected to the Arduino yet?
 
I can only give feedback on some of the digital connections - I'm not sure if the other components on the board (capacitors etc) are correct.
Looks like the servo position will be driven via PWM. Based on this image (https://www.circuito.io/blog/arduino-uno-pinout/) I don't know if the first or third servo is connected to a pin that can drive PWM (first being left most in the diagram).
The wiring for the MPU 6050 looks right based on another Arduino project I've found based on a search.
I guess there are 2 next steps:
- see if you can read the output from the MPU 6050: print to a PC via the USB?
- see if you can control one servo, or if you really want, go for all 4!
What circuit development website did you use? I'd be interested to have a look ...
 
A couple of interesting links that can help:
The second one seems to better correspond with where I would expect servos to be connected to the Arduino. Both links seem to have code samples.
 
Back
Top Bottom