To use Vbo Robot and its programming functions we have insert Vbo-control library in Arduino Software. These are some steps to insert
After Installation of Software you will get Arduino software shortcut on your desktop. Double click on that you will see following window on your screen:
Go to File menu. Select new file option. This method is applicable only when you are not getting blank sketch opened initially.
You will see this blank sketch of Arduino which consists of two loops i.e. void setup and void loop. Void set up is usually used to define pins of arduino and void loop is used for writing programming logic. You have to write program using these two loops.
In this we are going to write program for Led blinking. Arduino is having one on board led which connected to pin 13.Blinking of led means we are keeping it on for some time and off for some time. Write program in your sketch.
To save program go to file menu and click on save option you will see this following window on your screen.
Rename to that sketch file. Give it appropriate name.
After saving it will show message at bottom of program
After completion of this it will show this message.If your program is having error, find those errors and correct it. Again Re-Compile this.
After successful compilation now you can download your program to your Arduino. Connect your Board to PC/Laptop.
First select your type of board in which you want to download your program. For our programming we need Arduino Nano Board. Go to Tools menu àSelect Board Option àSelect Arduino Nano.
After this select Processor. Select Atmega328 option.
Now select Port through which we are downloading program to Arduino.
int a = vbo.get_distance();
int b = vbo.get_battery_level();
float c = vbo.get_battery_voltage();
int d = vbo.get_light();
int e = vbo.get_mic();