3.1 Get the Code
Go to our website www.sunfounder.com, click LEARN -> Get Tutorials, under Robot Kit find Rollbot, click it and on the page click the package Rollbot.zip to download, and unzip it.
3.1.1 Install Arduino IDE
The code in this kit is written based on Arduino, so you need to install the IDE first. Skip it if you have done this.
Now go to the arduino.cc website and click DOWNLOAD. On the page, check the software list on the right side under Download the Arduino Software.
Find the one that suits your operation system and click to download. There are two versions of Arduino for Windows: Installer or ZIP file. You’re recommended to download the former. Just download the package, and run the executable file to start installation. It will download the driver needed to run Arduino IDE. After downloading, follow the prompts to install.
For details of the installing steps, you can go to WIKI on our website www.sunfounder.com/wiki.
Install Arduino Software
After installing, you will see Arduino icon on your desk and double click to open it.
3.1.2 Connecting RollbotMicro to Your Computer
Use a USB Type-C cable (equipped in the kit) to connect the RollbotMicro to the computer. Once you’ve plugged in, the LEDs on the board will light, the computer will install the necessary driver automatically. Windows users can view the port in the device manager:USB Serial Port (COM55); your port must be different from mine.
3.2 Add libraries
1) Libraries are a collection of code that makes it easy for you to connect to a sensor, display, module, etc. In this kit ,you will need to add two libraries to the Arduino libraries folder: FlexiTimer2 and RollbotMicro
2) Select Sketch -> Import Library -> Add Library. Find the MsTimer2 library under the Library folder. Click Open.
3) Here you should see the Library has been added to your libraries. Check it by Sketch -> Include Library
4) Import the Rollbot library from the libraries folder in the same way.
5) Here you should see Library added to your libraries. Check Include Library and the libraries just imported have appeared on the list.