Leobot Electronics South Africa - Low Cost Arduino & Electronic Component Supplier based in Waverley, Pretoria, South Africa.
Leobot Electronics Online Shop
R42.10
Mercury switches provide a digital signal that triggers the PWM , through the program design, we can then see the light like two cups filled with the effect of shuffling back and forth.
dimming principle is to use the principle of two modules brightness changes for pwm.
Mercury switches provide a digital signal that triggers the PWM , through the program design,
We can see the light like two cups filled with the effect of shuffling back and forth.
test code:
int LedPinA = 5;
int LedPinB = 6;
int ButtonPinA = 7;
int ButtonPinB = 4;
int buttonStateA = 0;
int buttonStateB = 0;
int brightness = 0;
void setup()
{
pinMode(LedPinA, OUTPUT);
pinMode(LedPinB, OUTPUT);
pinMode(ButtonPinA, INPUT);
pinMode(ButtonPinB, INPUT);
}
void loop()
buttonStateA = digitalRead(ButtonPinA);
if (buttonStateA == HIGH && brightness != 255)
brightness ++;
buttonStateB = digitalRead(ButtonPinB);
if (buttonStateB == HIGH && brightness != 0)
brightness --;
analogWrite(LedPinA, brightness); //
analogWrite(LedPinB, 255 - brightness); //
delay(25);
[None Specified]
N/A
Arduino Automated Plant Water ProjectA simple but practical Arduino project to automatically water your plants, showing the usage of a 7-Segment Display, a Soild Moisture Sensor, a Temperature Sensor and a Relay.
Arduino IntroductionIntroducing you to the awesome Arduino!
Simple Arduino RC Car/Robot A guide to construct your own Arduino-based 2 Wheel-Drive Robot
Arduino F.A.Q Arduino Frequently Asked Questions & Answers
650nm Red Laser Transmitter Module
R18.90
Mini 5V Traffic Light LED Display Module
R38.53
Ambient Light Sensor Module (TEMT6000)
R44.95
Laser Receiver Module
R33.95
4X4X4 Blue LED 3D Matrix Light Cube DIY Arduino Shield Kit
R234.00
WS2812B RGB 5050 LED Module
R15.60
KY-034 Automatic 7 Color Colour Flashing LED Module (Arduino)
R36.00
WS2811/WS2812 RGB LED Module
R20.80
Infrared (IR) Transmitter Module
R43.95
Magic Light Cup Module (KY-027)
5V RGB LED Matrix (WS2812B 4x4 16-Bit)
R85.11
KY-011 5mm Two Color LED (Red and Green) Module (Arduino)
R33.00
10mm RGB LED Module
R45.95
Digital Light Intensity Sensor Module (BH1750FVI)
R91.50
Ambient Light Sensitivity Sensor Module (Temt6000)
R83.38
Get notified when new stock arrives! Simply provide your email address:
Want more stock than we have on-hand? Let us import this product in bulk for you! Bulk Direct Import