Skip to content

Instantly share code, notes, and snippets.

View buildcircuit's full-sized avatar

Sagar Sapkota buildcircuit

View GitHub Profile
@buildcircuit
buildcircuit / BTmodule.ino
Created December 5, 2020 03:58
Bluetooth-Arduino module from BuildCircuit
void setup() {
// initialize serial communication:
Serial.begin(38400);// this can be different for your Bluetooth module. It can be 9600 also.
// initialize the LED pins:
for (int thisPin = 2; thisPin < 13; thisPin++) {
pinMode(thisPin, OUTPUT);
}
}
void loop() {
@buildcircuit
buildcircuit / 23 up and down counter.ino
Last active July 18, 2020 10:35
Up and down counter module example for 2.3" display
// connect 9V to the counter module
// Connect 5V of Arduino to 5V of module
// Connect GND of Arduino to GND of module
// Connect pin 13 of Arduino to pin 5 of module
// Connect pin 12 of Arduino to pin 4 of module
// Connect pin 11 of Arduino to pin 14 of module
// other connections
//Use this example: https://www.arduino.cc/en/tutorial/debounce and make two exactly same circuits, connect one switch to pin 2 and other to pin 3 of Arduino
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 10, 9, 8, 7);
int REDLED = 3; // the PWM pin the LED is attached to
int BLUELED = 5;
int GREENLED= 6;
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 10, 9, 8, 7);
int led = 11; // the PWM pin the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
@buildcircuit
buildcircuit / blink_LCD.ino
Created July 2, 2020 10:09
Blink 5mm LED on the LCD Shield
@buildcircuit
buildcircuit / cd4029_ldr.ino
Created June 30, 2020 13:25
CD4029 up and down counter module responding to sensor
int sensorPin = A0; // select the input pin for the photoresistor
int CLK = 13; // Pin 13 of Arduino gives pulse to CD4029 module
int sensorValue = 0; // variable to store the value coming from the sensor
int RESET=11; // connect to reset pin of CD4029
int UD=12; // connect to UD pin of CD4029
void setup() {
Serial.begin(9600);
@buildcircuit
buildcircuit / cd4029.ino
Last active June 30, 2020 12:58
CD4029 up and down counter
// Basic test of CD4029 up and down counter module
// Module designed by Sagar Sapkota from www.buildcircuit.net
void setup() {
pinMode(13, OUTPUT);// Connect pin 13 to CLK pinl
pinMode(12,OUTPUT); // Connect pin 12 to UD
//RESET THE COUNTER
// Connect Pin 11 of Arduino to RST Pin
pinMode(11,OUTPUT);
digitalWrite(11,HIGH);
@buildcircuit
buildcircuit / esp8266-led-blink.ino
Created October 29, 2015 21:26
ESP8266 LED Blink Project
@buildcircuit
buildcircuit / RGB-SMD-LED.ino
Created October 20, 2015 22:11
RGB-SMD-LED-5050
/* ---------------------------------------------------------
* | Experimentation Kit for Arduino Example Code |
* | CIRC-RGB .: Colourful Light :. (RGB LED) |
* ---------------------------------------------------------
*
* We've blinked an LED and controlled eight in sequence now it's time to
* control colour. Using an RGB LED (actual 3 LEDs in a single housing)
* we can generate any colour our heart desires.
*
* (we'll also use a few programming shortcuts to make the code
/*arduino touch 8
VCC-----------5V
GND-----------GND
OUT1-----------2
OUT2-----------3
OUT3-----------4
OUT4-----------5
OUT5-----------6
OUT6-----------7
OUT7-----------8