fbpx Placeholder canvas

6.5 How to upload the code?

Caution: Before uploading the code remove the digital pin from the sound sensor and then after uploading the code reconnect the sound sensor with the same digital pin as mentioned in code.

After the coding is completed then compile and upload the code, follow the below mentioned steps:

1.Click on the verify button to compile or to check the error in the code. 

2. To upload the code in Arduino UNO firstly, connect Arduino UNO with your Laptop or PC via USB A to B cable as shown below: 

3. Now, select Arduino UNO board type in Arduino IDE: Go to tools <Board< Arduino AVR boards < Arduino UNO.

Note: If you have some older version of Arduino IDE then Go to tools< Board < Arduino Uno.

4. Then, again go to tools and select the Port as shown below:

Note : If the port is not coming,then check if the driver is installed in your PC or not.Please follow the steps mentioned in previous topic.

5.Now, click the upload button and when the uploading will be finished then you will see uploading finished written below.

Note : If the uploading is not finished then there are some error in the code. 

Note: Remember to connect the sound sensor again with the Arduino Uno.

6. After uploading the code,check your Clap controlled Robot is working properly or not.

Result:

  • When you will Clap 1 time and the car will move forward
  • When you will Clap 2 time and the car will move backward
  • When you will Clap 3 time and the car will move in left
  • When you will Clap 4 time and the car will move right.

Watch the Video of the Project in next slide.