Skip to main content

Posts

ARDUINO BASICS : POTENTIOMETER APPLICATION

ROLLER/REVERSE-ROLLER Description : With a potentiometer, controlling which of four leds is selected while a tact switch determines whether it is off or on (in contrast with the other leds). The higher the value mesured of the potentiometer the further the led selected. When the switch is pressed, that led will light up, if not, all but the led selected will light up. https://youtu.be/tGmokXSiuic   CODE const char L1 = 2; const char L2 = 3; const char L3 = 4; const char L4 = 5; char sw = 7; char swValue = 0; long pot = A0; long potvalue = 0; int ON; int OFF; void setup() {   pinMode(L1, OUTPUT);   pinMode(L2, OUTPUT);   pinMode(L3, OUTPUT);   pinMode(L4, OUTPUT);   pinMode(sw, INPUT); Serial.begin(9600); } void loop() { swValue = digitalRead(sw); potvalue = analogRead(pot);//*(5/1023)*50; potvalue = map(potvalue,0,1023,0,255); tact(); roller(); } void tact(){   if (swValue==1)   {       ON =0;       OFF = 255;  
Recent posts

ARDUINO BASICS : POTENTIOMETERS

POTENTIOMETERS A potentiometer is a resistor that has a mechanical shaft or screw that can be turned to change its resistance. A potentiometer is just a variable resistor: -> The longer the "trace" from W to either A or B, the higher the resistance. The two schematic symbols for a potentiometer are shown below: Rotary Potentiometers These are the most common type of potentiometers, where the wiper moves along a circular path. Linear Potentiometers In these types of Potentiometers the wiper moves along a linear path. Also known as slide pot, slider, or fader. Some Applications of Potentiometers Potentiometer as a Voltage Divider The potentiometer can be worked as a voltage divider to obtain a manual adjustable output voltage at the slider from a fixed input voltage applied across the two ends of the potentiometer.  Now the load voltage across RL can be measured as VL= R2RL. VS/(R1RL

ARDUINO BASICS :7-SEGMENT 1-DIGIT LED DISPLAY

The 7 segment led display consists of 7 leds that compose a digit and one for the decimal point. Check the type of display you have, some are common anodes and others common cathodes. This just determines wether you have to put them on HIGH or LOW to turn each led on or off. The goal was to be able to command from the serial monitor, the different digits showing up on the display. So first you define functions for each digit, turning on or off the right leds. Then using ifs in the loop and the ASCII table, you can link that to what we enter on the screen. https://www.youtube.com/watch?v=nZpYhfuZsOQ&feature=youtu.be CODE //Sketch for interface PC(serial monitor) to seven segment led display (1 digit) //see display chart for led placement, starts with A on the top center and ends with DP (decimal point) const char l_a = 2; //char is for small numbers, use "long" for others const char l_b = 3; const char l_c = 4; const char l_d = 5; const char l_e =

miniTEST3

Test : Push the button to read 1 not 0 in the Serial Monitor

TEST2

Test : Using a button to turn two LEDs on

TEST1

Test : Displaying the message "hello world" on an LED display screen Malfunction in the beginning with an unstable power connection, fixed, but while on the display never showed the message. We tested all the cables with another simpler circuit with a led. They were all functional. We tested a different display, arduino, resistor and breadboard. 

BURST WEEK 2 : D-ELITE

SELLING DEATH TO IMMORTALS the rich get to die young, the poor keep living https://www.youtube.com/watch?v=JhccPewRmDY