Forum where you can read and publish your Codebricks proyects. Tou will be ableto upload both images and codebrick source files.
8 mensajes • Página 1 de 1
Simple circuit with LED, potentiometer and button
We'll use this schema for the following Codebricks projects. In order to implement it, we need an Arduino-like board,,a breadboard, an LED , a resistor 220 or 470 Omh to limit the intensity in the LED , a button , a 10k resistor and a 10K Omh potentiometer.
Here we have the classic example of the blinking LED using a digital pin and a fix delay. In order to do this, we will connect a LED anode to the digital output #3.para ello and the cathode to ground with a 220 Omh resistor.
In this example, the circuit is like the previous one, with a lec connected to pin #3 with the same components. We use here a PWM (Pulse Wide Modulation) output to simulate an analogic value between 0 y 255, being 0 equivalent toa LOW y 255 a HIGH. Like in the above sketch, we use delay() function to slow the execution speed and be able to observ it. The intensity values are fist increasing and then decreasing in a loop.
¿Quién está conectado?
Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados