- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Yash Sanghvi has Published 220 Articles
Yash Sanghvi
456 Views
In order to blink an LED using Arduino, we first connect perform the hardware connections. Choose a pin of your board that supports digital output. We are using the Arduino Uno board, and we will choose pin 7. The circuit will look like this −As you can see, one end ... Read More
Yash Sanghvi
2K+ Views
By default, the analogRead in Arduino follows a 10-bit resolution (this may be different for different boards). However, sometimes, you may not need such a high resolution. Often, people wish to set the resolution to 8-bits, to save on storage. This is because an 8-bit value will take just one ... Read More
Yash Sanghvi
263 Views
Converting analog values to digital is a common requirement from microcontrollers in general, and Arduino is no different. Arduino IDE has a built-in analogRead function to facilitate the conversion of analog values to digital.From the programming perspective, the only thing you require to know is the pins of your microcontroller ... Read More
Yash Sanghvi
612 Views
In order to access any pin of your board in Arduino, you can simply reference the number of the pin as an integer. On the Arduino boards like Uno, the label is provided for all the I/O pins, and the same label can be used in the code.Thus, both the ... Read More
Yash Sanghvi
1K+ Views
The general way of using third-party libraries in Arduino is to install them from Tools -> Manage Libraries. We already have a separate post to cover that. However, what if a library you are using for cannot be found in Tools -> Manage Libraries? After all, Manage Libraries only includes ... Read More
Yash Sanghvi
869 Views
What are interrupts?As the name suggests, interrupts are routines that interrupt the normal code flow. An interrupt routine contains a piece of code that the microcontroller on your board should execute whenever an event occurs. Take the air-conditioner example. Suppose it has the following temperature control settings: Switch off cooling ... Read More
Yash Sanghvi
7K+ Views
In every language, generally, the first Hello World project is a simple program that prints "Hello World"! We will see what such a code would look like for Arduino. The below code will print "Hello World" on the screen every time your board is powered ON.Examplevoid setup() { Serial.begin(9600); ... Read More
Yash Sanghvi
6K+ Views
The for and while loops in Arduino follow the C language syntax.The syntax for the for loop is −Syntaxfor(iterator initialization; stop condition; increment instruction){ //Do something }Examplefor(int i = 0; i< 50; i++){ //Do something }Similarly, the syntax for the while loop is −Syntaxwhile(condition){ //Do something }Exampleint ... Read More
Yash Sanghvi
192 Views
The Arduino Code has a very simple structure. If you open a new project in the Arduino IDE, you will see the following template prepared for you −Examplevoid setup() { // put your setup code here, to run once: } void loop() { // put your main code ... Read More
Yash Sanghvi
372 Views
If you are familiar with the C language and would like to use the formatting options provided by C language in the Arduino print statements, then there's an easy way to do it. All you need to do is define a character array, and populate it using sprintf(). Within sprintf, ... Read More
To Continue Learning Please Login
Login with Google