Загрузка страницы

Tinkercad Circuit Tutorial 4: How to control Brightness of the LED / Fading

First, you need to set up the Arduino board by connecting it to the computer and uploading the Arduino IDE.

Next, you need to connect the LED to the Arduino board.

Then, you need to open the Arduino IDE and write the following code:

int led = 9; // the pin that the LED is attached to int brightness = 0; // how bright the LED is int fadeAmount = 5; // how many points to fade the LED by // the setup routine runs once when you press reset: void setup() { // declare pin 9 to be an output: pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { // set the brightness of pin 9: analogWrite(led, brightness); // change the brightness for next time through the loop: brightness = brightness + fadeAmount; // reverse the direction of the fading at the ends of the fade: if (brightness == 0 || brightness == 255) { fadeAmount = -fadeAmount ; } // wait for 30 milliseconds to see the dimming effect delay(30); }

This code will control the brightness of the LED using PWM.

TinkerCad is a free, easy-to-use app for 3D design, electronics, and coding. It's used by teachers, kids, hobbyists, and designers to imagine, design, and make anything!
A TinkerCad circuit is a digital circuit design and simulation tool. It is used to create and simulate electronic circuits. you can program the circuit as well using tinkercad.TinkerCad circuits use a simple, visual editor to design. and simulate electronic circuits. They can be used to create and simulate simple digital circuits, such as logic gates and flip-flops. TinkerCad circuits are free to use and can be accessed online.
TinkerCad Circuit is a simple, easy-to-use app for designing and simulating electronic circuits. With Circuit, you can design and simulate digital and analog circuits, and test them on a virtual breadboard. TinkerCad is a great way to get started with electronics, and Circuit is the perfect tool for designing and testing simple circuits.
There's no need to download or install anything - Circuit is entirely web-based, so you can use it on any computer, tablet, or phone.
Best of all, Circuit is free to use!
-----------------------------------------------------------------------------
"Circuits Bazaar" Social Media Link
- https://circuitsbazaar.com/
- https://www.instagram.com/circuitsbazaar/
- https://www.facebook.com/circuitsbazaar/
- https://twitter.com/circuits_bazaar
Circuits Bazaar provides basics and advanced level learning of Electrical and Electronics Engineering through Projects and Tutorials. you can ask a question about your problems or request a video.
-----------------------------------------------------------------------------

#tinkercad #Tinkercad_Tutorial #Getting_Started_With_Tinkercad
PS: SUBSCRIBE "Circuits Bazaar" for more Trusted & Awesome videos.

Видео Tinkercad Circuit Tutorial 4: How to control Brightness of the LED / Fading канала Innovative Indian Projects
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
9 сентября 2022 г. 21:39:19
00:08:46
Яндекс.Метрика