You can download the user manual from:
|Buy from USA||Buy from UK||Buy from DE||Buy from IT||Buy from FR||Buy from ES||ここでご購入を！|
In this tutorial, we will use Osoyoo Sport Car for Arduino to do some simple movements. Once the car installation is completed, it is very important to test the installation and sample code. If you have passed the test movement of this lesson, it means OSOYOO Basic Board for Arduino, motor control module, motors, batteries, chassis and wire connections between these parts are all functioning well.
If you don’t complete the frame of car, please review lesson 1
|Download Arduino IDE here:
|7 zip is a free zip
utility that un-zips zip files
|Download 7zip here for free
Step 1: Download PWMServo library zip file from https://osoyoo.com/driver/sg90car/PWMServo.zip ,
then import the library into Arduino IDE(Open Arduino IDE-> click Sketch->Include Library->Add .Zip Library)
You will see a pop-up windows , now you can go to your download folder and select PWMServo.zip file and upload this file to Arduino library.
Step 2: Download Lesson 2 sample code , unzip the download zip file sg90car-lesson2b.zip, you will see a folder called sg90car-lesson2 .
Step 3: Connect UNO R3 board to PC with USB cable, Open Arduino IDE -> click file -> click Open -> choose code “sg90car-lesson2.ino” in sg90car-lesson2 folder, load the code into OSOYOO Basic Board for Arduino.
Notice: Shut off your battery or Unplug your power adapter when upload sketch code to OSOYOO Basic Board for Arduino.
#define FRONT 90 // steering to front
Step 5: Choose corresponding board/port for your project, upload the sketch to the board.
1.Disconnect OSOYOO Basic Board for Arduino from PC and confirm that the power switch of the OSOYOO Motor Shield V1.1 is off, then put a 9V battery into battery box.
(Note: make sure polar direction is correct, otherwise it can destroy your device and cause fire hazard).
2. Put the car on the ground, turn on the switch of OSOYOO Motor Shield V1.1, the car should go forward, backward, left turn, right turn, go backward, back to right, back to left, then stop.
Note: If the car does not move as per above mentioned result, you should check your wire connection, jumper caps on OSOYOO Motor Shield V1.1, battery voltage (must over 7.2v).
3. If you want to change the angel of the right or left, please edit the line 20 and 21 of the code and upload the sketch again: ( Note: the angel can’t be set more than 35. As the rear wheels are driven without a rear-axle differential between motor and wheels. But all four wheels have a good grip on the floor. The more the front wheels are turned to the left or right, the more they do brake against the rear-wheels. Starting with a certain angle this braking force is bigger than the motor driving force– then the motor will stop. )
int SHARP_RIGHT=FRONT+33; int SHARP_LEFT=FRONT-33;
4. If you want to change the speed of the car, please revise the following code of the sketch (Note: the max value is 255)
#define SPEED 190 #define HI_SPEED 220
DownLoad Url osoyoo.com