0% found this document useful (0 votes)
24 views

Circuit Design Powerful Blad Tinkercad

This document contains code for an Arduino Uno that controls the brightness of an LED based on the position of a potentiometer. The code defines the potentiometer and LED pins, sets them up as input and output in the setup function, reads the potentiometer value in the loop, prints it to the serial monitor, and uses it to set the brightness of the LED via analogWrite.

Uploaded by

sidplus2011
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Circuit Design Powerful Blad Tinkercad

This document contains code for an Arduino Uno that controls the brightness of an LED based on the position of a potentiometer. The code defines the potentiometer and LED pins, sets them up as input and output in the setup function, reads the potentiometer value in the loop, prints it to the serial monitor, and uses it to set the brightness of the LED via analogWrite.

Uploaded by

sidplus2011
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Powerful Blad Saved

This is an Electronics Lab design, you can only edit and add components in the Lab View.
Code Start Simulation
View Send
Layers
To

Text Components 1 (Arduino Uno R3)


Basic
1 #define POTEN A3
2 #define LED 6
3 int poten_value = 0; Search
4
5 void setup(){
6 pinMode(POTEN, INPUT);
7 pinMode(LED, OUTPUT);
8 Serial.begin(9600);
9 }
10 Resistor LED Pushbutton
11 void loop(){
12 poten_value = analogRead(POTEN) / 4;
13 Serial.println(poten_value);
14 analogWrite(LED, poten_value);
15 }
Finishing Potentiometer Capacitor Slideswitch
Privacy settings

9V Battery Coin Cell 3V 1.5V Battery


Battery

Breadboard micro:bit Arduino Uno


Small R3

Serial Monitor

You might also like