Published on

Getting Things Ready

Table of Contents

Safety guidelines

  • Double check the polarities of any connections you make.
  • Keep a consistent wiring color code. Use red for power and black for ground.
  • Calculate the expected current through all components before you apply power. Check the datasheet to make sure it's within safe limits.
  • Calculate the heat dissipation for higher power components like power supplies and motor drivers.
  • Connect and test one small part at a time, instead of in one big bang.
  • Make sure the parts you use expect the same voltage, or perform the appropriate conversion.
  • Don't plug in an LED without a current limiting resistor.
  • Don't short 5V to ground.
  • Don't work on your circuitry while having power applied to your Arduino.

Installing the IDE

System Requirements:

  • Windows - Win 10 and newer, 64 bits
  • Linux - 64 bits
  • Mac OS X - Version 10.14: "Mojave" or newer, 64 bits

We recommend installing version 1.8.15, the link to which can be found here.

Installing the Arduino Software (IDE) on Windows

Get the latest version from the download page. You can choose between the Installer (.exe) and the Zip packages. We suggest you use the .exe since it installs everything you need to use the Arduino Software (IDE), including the drivers. With the portable(zip) installation you need to install the drivers manually.

When the download finishes, proceed with the installation and please allow the driver installation process when you get a warning from the operating system.

IR

Choose the components to install,

IR

Choose the installation directory (we suggest to keep the default one),

IR

The process will extract and install all the required files to execute properly the Arduino Software (IDE). You should be good to go!

Installing the Arduino Software (IDE) on macOS

Download the Arduino Software (IDE). Get the latest version from the Arduino Downloads Page. The file is in Zip format. If you use Safari it will be automatically extracted. If you use a different browser you may need to extract it manually.

IR

Copy the Arduino application bundle into the Applications folder (or elsewhere on your computer).

IR

You should now be able to run the application.

Install the Arduino Software (IDE) on Linux

This section explains how to install the Arduino Software (IDE) on Linux machines.

Get the latest version from the Arduino Downloads Page. You can choose between the 32, 64 and ARM versions. It is very important that you choose the right version for your Linux distro. After selecting the right version, save it on your computer.

IR

Extract the package

The file is in a compressed format. You will have to extract it to a suitable directory. Take note that the software will be executed from this directory.

IR

Run the install script

Open the arduino folder just created by the extraction process and spot the install.sh file. Right click on it and choose Run in Terminal from the contextual menu. The installation process will quickly end and you should find a new icon on your desktop.

If you don't find the option to run the script from the contextual menu, you have to open a Terminal window and move into the arduino folder. Type the command ./install.sh and wait for the process to finish.(You may need root access for this).You should find a new icon on your desktop.

IR

Now move into the extracted arduino-1.8.12 directory and run the installation script with root privileges as shown.

Troubleshooting (for Linux users only)

It might happen that when you upload a sketch - after you have selected your board and the serial port -, you get an error Error opening serial port ... If you get this error, you need to set serial port permission.

Open Terminal and type:

ls -l /dev/ttyACM*

you will get something like:

crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyACM0

The "0" at the end of ACM might be a different number, or multiple entries might be returned. The data we need is "dialout" (is the group owner of the file).

Now we just need to add our user to the group:

sudo usermod -a -G dialout < username>

where <username> is your Linux user name. You will need to log out and log in again for this change to take effect.

IR

This is the procedure to access the serial port from the Arduino Software (IDE) if you get an error

After this procedure, you should be able to proceed normally and upload the sketch to your board or use the Serial Monitor.

Uploading a code

Introduction

When you are working with your project using your Arduino, you should know to upload the code correctly to the Arduino to get a successful result. In this section, we are going to tell how to successfully upload a code into an Arduino

Requirements

  1. First, you should have an Adruino in which you are going to upload.
IR
  1. Then you should have a USB cable type A/B for connecting Arduino to a laptop/pc.
IR
  1. And obviously a laptop/pc with Arduino IDE installed in it.

Method

Step 1 :- Connect your arduino with your laptop/pc with help of USB cable type A/B, the square end will go into arudino and flat end in laptop/pc Step 2 :- Open the Arduino IDE and in that go to Tools→Board and select type of arduino you are using for your project ( which is the UNO in our kit)

For Windows User :-

IR

For Mac OS User :-

IR

For Linux User :-

IR

Step 3 :- Now go to Tools→Port and then select port that is connected with Arduino, if you have properly connected arduino with laptop/pc then it will display the name of Arduino board connected to it with the name of the respective port

For Windows :-

IR

For Mac :-

IR

For Linux :-

IR

Step 4 :- Then for uploading code, click the arrow that points toward right in Arduino environment. You can also use Ctrl + U/Cmd + U shortcut for uploading the code


If you are using linux, you will probably get a error like :- avrdude: ser_open(): can't open device ”/dev/ttyACM0“: Permission denied


To solve that problem, you need to set serial port permission. To do that, open the terminal and type :- sudo usermod -a -G dialout <username>, replace the username with your linux username

Serial Monitor

If you are using printing commands for printing, to see the output, on top right corner, there will be an icon similar to a magnifying glass.

IR

Click on that, then a serial monitor will pop up. Select the baud rate you have defined in the code in that serial monitor

IR

And then you will able to see the output.

Troubleshooting problems

While working with arduino, you can encounter some of these common problems/errors

1. Port Error

IR

if you get an error similar to this, it must be related to thee prot issues. Check if you have properly connected the arduino to the laptop/pc with cable, if you have connected properly then go to Tool→Port and then check if you have selected correct port in it.

2. Port Not Accessable (For Linux Users)

If you are using linux, you could possibly get a error like this :- avrdude: ser_open(): can't open device ”/dev/ttyACM0“: Permission denied To solve that, add yourself to the dialout group, for doing that, open the terminal and then type this command :- sudo usermod -a -G dialout <username>

3. Port Busy Error

IR

When you upload your code and it takes too much time for uplaodinng and then give you a error like this, you must have selected wrong board in Tool→Board, so go to that location and select board that you are using. If error is still there, then restart your Arduino IDE

4. Board Not in Sync

IR

If you get this error, try one of these steps :-

  • First, try to disconnect and reconnect the USB cable from Arduino and laptop/pc
  • Press reset button on arduino
  • Restart the Arduino IDE
  • Make sure that you have selected correct board in Tool→Board
  • Make sure that you have selected correct port in Tool→Port
  • Make sure digital pins 0 and 1 do not have any parts connected
  • Reinstall Arduino IDE on your laptop/pc

If you still get the error, the arduino must be broken.

5. Blank Serial Monitor

If you are printing something using Serial.print() or Serial.println() command but still your serial monitor is blank, then check

  • If you have declared baud rate of arduino in void.setup() using command Serial.begin().
  • If above is checked, then check if your baud rate defined in the command Serial.begin() and baud rate selected in the serial monitor are the same.
  • Check if you have used correct syntax, or it could be missed by the branching of if and else statement.

6. Misc. Driver Issues

The system should install the compatible drivers for the board. However, If you do face any driver issues during the first time you connect the Arduino board to your USB port, you may have to install compatible CH340 Drivers, which can be found here.

Creating TinkerCAD Account

To create a Tinkercad account:

  1. Click Sign Up on the Tinkercad homepage.

The Create Account dialog box, shown here, appears.

IR
  1. Choose your country from the drop-down list.

In my case, that would be the India.

  1. Enter your birthday.

  2. Click the Next button.

The next Create Account dialog box, shown here, appears.

IR
  1. Add your email address and a password, accept the Tinkercad terms of service, and click Create Account.

The confirmation screen shown here appears. The confirmation screen shows you that your Tinkercad account has been created. It also tells you that your Autodesk ID gives you access to many other Autodesk cloud-based products, including AutoCAD 360, A360, Fusion 360, and many others.

IR

Creating Onshape Account

Introduction

Onshape is an online version of CAD which is useful for designing, simulations, etc. You could access it without paying using it's educational version for a limited time. In this section, we're going to show how to access it.

Method

  • First, go to the website of Onshape and on top right corner, click on "SIGN IN" button

  • Then click on "Sign up"

    IR
  • Then scroll down and click on education account

    IR
  • Then scroll down and enter your first and last name, in email enter your bits mail, in 'Are you a stuent or educator' box, choose "Student", and in 'School level' box, choose "College or University" and then on bottom, click on "CREATE EDU ACCOUNT" button

    IR
  • Now, in first box, in which 'School Name' is written, in that enter "BITS Pilani, Hyderabad Campus". In second box conatining 'School website URL', enter "www.bitsadmission.com". Enter your respective City, State, Country, Graduation year and Area of study / degree in respective boxes and in last box containing 'What are you using Onshape for?', enter "Educational Purposes"

    IR
  • Then scroll down and check all boxes and click on "I'm not a robot" box and then click on "Create Account" box

  • Then check your mail box, you will get an activation email, click on "ACTIVATE YOUR ACCOUNT" button, it will then ask you to create password, so set your password, agree to it's term and service and then click on "Get Started".

  • It will ask you to "Set your default units", on that, in length units, select millimeter, and in mass units, slect killogram and then click next, then it will show mouse controls and then it will ask to set a nickname, so set and click next and then it will check your browser, after that click on done


If everything goes perfect as above, Congratulations you successfully registered on Onshape :)

Installing Bluetooth Module App

Scan the QR code and download the app with which you can control your bot.

Note - This app works only on android devices. bt-app

Congratulations! You have reached the end of the 'Getting Started' section of the workshop. You are now fully prepared to proceed to the following sessions. Keep exploring!