Skip to content

Instantly share code, notes, and snippets.

View techzeero's full-sized avatar
🎯
Focusing

Techzeero techzeero

🎯
Focusing
View GitHub Profile
/*
Controlling Multiple LEDs With an Arduino
For more details, visit: https://techzeero.com/arduino-tutorials/multiple-leds-blinking-using-arduino/
*/
void setup()
{
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
pinMode(5, OUTPUT);
/*
Controlling Multiple LEDs With an Arduino
For more details, visit: https://techzeero.com/arduino-tutorials/multiple-leds-blinking-using-arduino/
*/
void setup()
{
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
pinMode(5, OUTPUT);
/*
How to use an RGB LED with Arduino
For more details, visit: https://techzeero.com/arduino-tutorials/how-to-use-an-rgb-led-with-arduino/
*/
void setup()
{
pinMode(3, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
/*
Display Potentiometer Readings on LCD Display
For more details, visit: https://techzeero.com/arduino-tutorials/display-potentiometer-readings-on-lcd-display/
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
/*
Adjusting the Color of an RGB LED
For more details, visit: https://techzeero.com/arduino-tutorials/adjusting-the-color-of-an-rgb-led/
*/
const int redPin = 3; // choose the pin for each of the LEDs
const int greenPin = 5;
const int bluePin = 6;
const boolean invert = false; // set true if common anode, false if common cathode
int color = 0; // a value from 0 to 255 representing the hue
/*
How to use Potentiometer with Arduino
For more details, visit: https://techzeero.com/arduino-tutorials/how-to-use-potentiometer-with-arduino/
AnalogReadSerial
Reads an analog input (potentiometer) on pin 0,
prints the result to the serial monitor.
OPEN THE SERIAL MONITOR TO VIEW THE OUTPUT FROM THE POTENTIOMETER >>
/*
LED Blinking Control by Potentiometer
For more details, visit: https://techzeero.com/arduino-tutorials/led-blinking-control-by-potentiometer/
Blink an LED at a rate set by the position of a potentiometer
*/
const int potPin = 0; // select the input pin for the potentiometer
const int ledPin = 5; // select the pin for the LED
int val = 0; // variable to store the value coming from the sensor
void setup()
@techzeero
techzeero / LCD Display with Arduino.ino
Last active October 21, 2019 09:57
we learn how to use an LCD Display with Arduino. We use LCD 16 x 2 Display. https://techzeero.com/arduino-tutorials/how-to-use-an-lcd-display-with-arduino/
/*
How to use an LCD Display with Arduino
For more details, visit: https://techzeero.com/arduino-tutorials/how-to-use-an-lcd-display-with-arduino/
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
@techzeero
techzeero / Ultrasonic Sensor With Arduino.ino
Last active October 21, 2019 09:56
In this tutorial, we learn how to measure the distance by using the Ultrasonic Sensor with Arduino. https://techzeero.com/arduino-tutorials/ultrasonic-sensor-with-arduino/
/*
Ultrasonic Sensor with Arduino
For more details, visit: https://techzeero.com/arduino-tutorials/ultrasonic-sensor-with-arduino/
*/
int trigPin = 9; // Trigger Pin of Ultrasonic Sensor
int echoPin = 8; // Echo Pin of Ultrasonic Sensor
void setup()
{