Top 6 Basic Arduino Projects in Tinkercad | Simulations in Tinkercad | Arduino | Liono Maker
by Liono Maker in Circuits > Arduino
20929 Views, 9 Favorites, 0 Comments
Top 6 Basic Arduino Projects in Tinkercad | Simulations in Tinkercad | Arduino | Liono Maker
Introduction:
hi everyone, this is Liono Maker.
Link to my channel:Link
In this tutorial we will learn how to simulate Arduino in Tinkercad. We are using basic components and compiling their codes in Tinkercad. Tinkercad software: this is advance software, online 3D modeling program that runs in a web browser, known for its simplicity and ease of use. we can simulate Arduino based circuits without hardware. Top 6 Arduino Projects in Tinkercad are:
1- How to print on serial Monitor
2- LED Blinking Simulation in Tinkercad
3- Push Button Simulation in Tinkercad
4- Analog POT Simulation in Tinkercad
5- Buzzer Simulation in Tinkercad
6- LED RGB Simulation in Tinkercad
Join Tinkercad: here
1- how to print on serial monitor
The Serial Monitor is a separate pop-up window that acts as a separate terminal that communicates by receiving and sending Serial Data.
we have two loop in coding "void setup( )" and "void loop( )". In "void setup( )" we are writing command "Serial.begin(9600);" serial monitor begin in the given time, 9600 bits per second. The second command "serial.print("Liono Maker");" , this prints the name given in the parenthesis.
Components required:
1- Arduino board
Software:
1- Tinkercad
Coding for serial monitor:
void setup()
{
Serial.begin(9600); Serial.println("Liono Maker");
}
void loop()
{
}
Output:
Liono Maker
2- LED Blinking simulation in Tinkercad
Introduction:
To blink the LED takes only a few lines of code. The first thing we do is define a variable that will hold the number of the pin that the LED is connected to.We do this with two calls to the digitalWrite() function, one with HIGH to turn the LED on and one with LOW to turn the LED off.
Components Required:
1- LED
2- Resistor (1k)
3- Arduino board
Software:
1- Tinkercad
Coding for LED Blinking:
int led = 8;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
3- Simple push Button in Tinkercad
Introduction:
Pushbuttons or switches connect two points in a circuit when you press them.
This example turns on the built-in LED on pin 13 when you press the button.
Connect three wires to the board. The first two, green and red, connect to the
two long vertical rows on the side of the breadboard to provide access to the 5 volt supply and ground. The third wire goes from digital pin 2 to one leg of the pushbutton. That same leg of the button connects through a pull-down resistor (here 10K ohm) to ground. The other leg of the button connects to the 5 volt supply.
When the pushbutton is open (unpressed) there is no connection between the two legs of the pushbutton, so the pin is connected to ground (through the pulldown resistor), and we read a LOW. When the button is closed (pressed), it makes a connection between its two legs, connecting the pin to 5 volts, so that we read a HIGH.
You can also wire this circuit the opposite way, with a pull-up resistor keeping the input HIGH, and going LOW when the button is pressed. If so, the behavior of the sketch will be reversed, with the LED usually on and turned off when you press the button. If you disconnect the digital I/O pin from everything, the LED may blink erratically. This is because the input is "floating" - that is, it will randomly return either HIGH or LOW. That's why you need a pull-up or pull-down resistor in the circuit.
Components Required:
1- Push Button
2- Resistor
3- Arduino board
4- BreadBoard
Software:
1- Tinkercad
Coding for push Button:
const int buttonPin = 2;
const int ledPin = 13;
int buttonState = 0;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin,INPUT);
}
void loop() {
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
digitalWrite(ledPin, HIGH); // turn LED on:
}
else
{
digitalWrite(ledPin, LOW); // turn LED off:
}
}
4-Analog POT Simulation in Tinkercad
Introduction:
A potentiometer is a simple knob that provides a variable resistance, which
we can read into the Arduino board as an analog value. In this example, we read the value of Potentiometer and display it in serial monitor. We connect three wires to the Arduino board. The first goes to ground from one of the outer pins of the potentiometer. The second goes from 5 volts to the other outer pin of the potentiometer. The third goes from analog input 2 to the middle pin of the potentiometer. By turning the shaft of the potentiometer, we change the amount of resistance on either side of the wiper which is connected to the center pin of the potentiometer. This changes the relative "closeness" of that pin to 5 volts and ground, giving us a different analog input. When the shaft is turned all the way in one direction, there are 0 volts going to the pin, and we read 0. When the shaft is turned all the way in the other direction, there are 5 volts going to the pin and we read 1023. In between, analogRead() returns a number between 0 and 1023 that is proportional to the amount of voltage being applied to the pin.
Components Required:
1- Analog POT (e.g. 10k)
2- connecting wires
3- Arduino Board
4- BreadBoard
Software:
1- Tinkercad
Coding for Analog POT:
int potPin =0; //analog input
void setup()
{
Serial.begin(9600);
}
void loop()
{
int reading =analogRead(potPin);
Serial.println(reading);
delay(500);
}
5- Buzzer with Arduino Simulation in Tinkercad
Introduction:
Buzzer: A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm devices, timers, and confirmation of user input such as a mouse click or keystroke.
Connecting a Buzzer to an Arduino Uno: If a buzzer operates from a low enough voltage and draws low enough current, it can be interfaced directly to an Arduino Uno pin. The buzzer used in this example can operate from a voltage between 3 to 28V and draws the only 4mA of current at 12V. When the current drawn by the buzzer was measured at 5V, it was found that it only drew about 1.1mA which is well within the drive capability of an Arduino Uno pin.
Components Required:
1- Buzzer
2- Arduino board
3- breadboard
Software:
1- Tinkercad
Coding for Buzzer:
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
6- LED RGB Flasher with Arduino Simulation in Tinkercad
Introduction:
The RGB Flasher is an awesome Arduino micro controller gadget that displays three colors (red, green, and blue) on one LED. You can easily build the circuit on the Maker Shield, which will make it portable so you can carry it in your shirt pocket. You can use either the Fritzing diagram shown in Figure given above, circuit schematic diagram to build the flasher.
Components Required:
1- LED RGB Flasher
2- Arduino board
3- Breadboard
4- resistor (1k)
Software:
1- Tinkercad
Coding for LED RGB:
int redled= 9;
int grnled = 10;
int bluled = 11;
void setup() {
pinMode(redled, OUTPUT);
pinMode(grnled, OUTPUT);
84 Make: Basic Arduino Projects
pinMode(bluled, OUTPUT);
digitalWrite(redled, HIGH);
digitalWrite(grnled, HIGH);
digitalWrite(bluled, HIGH);
}
void loop() {
digitalWrite(redled, LOW); // turn the red LED on
delay(1000); // wait for a second
digitalWrite(redled, HIGH); // turn the LED off
delay(1000); // wait for a second
digitalWrite(grnled, LOW); // turn the green LED on
delay(1000); // wait for a second
digitalWrite(grnled, HIGH); // turn the green LED off
delay(1000); // wait for a second
digitalWrite(bluled, LOW); // turn the blue LED on
delay(1000); // wait for a second
digitalWrite(bluled, HIGH); // turn the blue LED off
delay(1000); // wait for a second
}