0% found this document useful (0 votes)
42 views16 pages

Arduino: Ders 2

This document provides an overview of coding with Arduino. It discusses understanding problems, creating flowcharts to break problems into steps, coding the solution, and testing and debugging code. It also lists the materials needed for an Arduino course, how to install the Arduino IDE software, and provides an example of the "Blink" code to turn an LED on and off.

Uploaded by

deni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views16 pages

Arduino: Ders 2

This document provides an overview of coding with Arduino. It discusses understanding problems, creating flowcharts to break problems into steps, coding the solution, and testing and debugging code. It also lists the materials needed for an Arduino course, how to install the Arduino IDE software, and provides an example of the "Blink" code to turn an LED on and off.

Uploaded by

deni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

ARDUINO

DERS 2

Adopted from edx


HOW TO CODE?

• Understanding the Problem


• Finding a Solution Flowchart
• Coding
• Testing the Code
• Debugging (If Required)
FLOWCHART

• Understanding the problem


• Breaking down into valid steps
• Reviewing conditions (if available)
• Appropriate processing and output.
FLOWCHART

• An event as simple as eating food, sitting on a chair, etc. can be represented


using flowchart.
• Using it we can break down the process into simpler sub-processes, eventually
helping us with coding.
• In the beginning it might be confusing, time consuming and useless as well, but
once well acquainted to it, it shall be of great help.
THINGS YOU NEED FOR THIS COURSE
• Arduino UNO R3
• Breadboard
• Jump leads
• LEDs
• Resistors
• LDR/Photoreistor
• Push Button
• Potentiometer
• Piezo Buzzer
• Mini Servo Motor
• Optional: 16x2 LCD
SOFTWARES FOR WRITING AND TESTING CODES
1. The Arduino IDE is the preferred tool to use with the Arduino board, as it allows you
to upload code to your Arduino board via USB. This software requires installation on
your Windows, Linux or Mac computer.
2. Finally, TinkerCad by Autodesk allows us to create and simulate circuits on a
browser! This even requires no installation.
HOW TO INSTALL ARDUINO IDE?

• Go to www.arduino.cc
• Under Downloads tab, go for Software.
• Download an appropriate Arduino IDE for your platform.
• Install the downloaded file.
• Open Blink from examples and try loading it to your Arduino.
TINKERCAD CIRCUITS

• https://www.tinkercad.com/circuits
• It requires an AutoDesk account which can be created by getting registered
to the website.
• You can simulate the circuit by drawing it and loading the code to the Arduino.
BLINK EXAMPLE
CODE
• Blocks:
• setup
• loop
• Functions
• Name
• Inputs as Parameters or Arguments
• Output
• pinMode sets the specified pin to be an input our output (in this case we pass
OUTPUT as the second parameter
pinMode(led,OUTPUT);
• digitalWrite Setting a specified pin OUTPUT status.
digitalWrite(led, HIGH);
• delay pauses the program for a number of milliseconds (thousandths of a second)
which is passed as its parameter:
delay(1000);
SIMULATION

• TinkerCAD

Next Week Quiz


Questions?

You might also like