Loading

Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

Eric's Sainsmart 4WD Arduino Robot Code

by EricWilliam, published

Eric's Sainsmart 4WD Arduino Robot Code by EricWilliam Nov 14, 2013
0 Share
Download All Files

Thing Apps Enabled

Order This Printed View All Apps

Contents

Use This Project

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

16735Views 2648Downloads Found in Robotics

Summary

Here is the current code, information and files for my Sainsmart 4WD robot build. The code is not optimized whatsoever but functions well enough at this point. So many people have asked for the code due to troubles- I decided to post it here.

You will need to modify the code to suit your setup and connections but this should provide a baseline for anyone struggling with their robot.

Good luck in your build. If this helped you please consider leaving a comment or thumbs up on my YouTube videos. There are several covering much of this robot build. For future updates please consider subscribing.

I ask 2 things of anyone who uses this:

  • Give credit when possible to those who help you
  • Improve and share code to better the experience for everyone

Updated code an instructions:
http://blog.mkme.org/index.php/arduino-sainsmart-4wd-robot/

Channel:
https://www.youtube.com/user/Shadow5549

This robot build and my other Arduino videos:
https://www.youtube.com/watch?v=Bpht2otFoF4&list=PLxyM2a_cfnzh9sbbEMFvFAGvNKfSElkvC

Another:
https://www.youtube.com/watch?v=sztUkGO6Fuo

Unboxing:
https://www.youtube.com/watch?v=BD3JAdnVosg&list=UUTo55-kBvyy5Y1X_DTgrTOQ

Most recent Video:
https://www.youtube.com/watch?v=7sN_mxAh7Og

Cheers!

Note:
If you are here due to a high level of frustration with the programming, hardware and/or components- fear not. You are not alone. Check out the below vid (no link so as to not say bad things about anyone's products). I just about went crazy when I first built this thing- It DOES get easier. Hence me sharing the code ;)

Youtube:
watch?v=7U4yzxh0IMQ&list=UUTo55-kBvyy5Y1X_DTgrTOQ

Update V9 Code:
Updated to better deal with corners and direction change

Instructions

Simply edit the code to suit your pin configuration and comment out any items you don't want to include. From there you should have a decent base to develop your robot from!

Mount for distance sensor servo and sensor itself can be found on Thingiverse- links to be updated.

If you get your robot working using this code or any mods/info found here- please share with me via YouTube. I would be truly excited to see your creation.

Cheers

More from Robotics

view more

All Apps

3D Print your file with 3D Hubs, the world’s largest online marketplace for 3D printing services.

App Info Launch App

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Print through a distributed network of 3D printing enthusiasts from across the US, at a fraction of the cost of the competitors. We want to change the world for the better through technology, an...

App Info Launch App

Quickly Scale, Mirror or Cut your 3D Models

App Info Launch App

3D Print a wide range of designs with Treatstock. Easy to use tools to get the perfect result. The global 3D printing network that connects you with high-quality and fast working print services nea...

App Info Launch App

It actually works pretty good. A lot of people have it working just fine. I've noticed some discrepancies now and again with mine- but suspect that is code based. I think with the new libraries etc- it should be VERY capable. At the speed these things can sample at- you should be able to do it while moving even. Overall mine seems to be pretty good considering how crude the code currently is :) Cheers.

how well does the ultrasonic sensor work when it is panned on the servo? i am working on building this exact setup (same ultrasonic sensor, mounted on a servo) but other members of the team insist it won't work well. what's your opinion?

It actually works pretty good. A lot of people have it working just fine. I've noticed some discrepancies now and again with mine- but suspect that is code based. I think with the new libraries etc- it should be VERY capable. At the speed these things can sample at- you should be able to do it while moving even. Overall mine seems to be pretty good considering how crude the code currently is :) Cheers

Top