Skip to content

Instantly share code, notes, and snippets.

View buildcircuit's full-sized avatar

Sagar Sapkota buildcircuit

View GitHub Profile
@buildcircuit
buildcircuit / gist:2758308
Last active January 30, 2024 01:14
Simple IR sensor using Arduino
/*
IR_remote_tester_and_detector
Connect the output pin of Infrared remote to DIG 2
Connect an LED to pin 13.
*/
#include <IRremote.h>
const int irReceiverPin = 2;
const int ledPin = 13;
IRrecv irrecv(irReceiverPin); //create an IRrecv object
@buildcircuit
buildcircuit / gist:2758364
Last active October 5, 2015 05:47
PWM control signals using Arduino and Infrared
/*
RemoteDecode sketch
Infrared remote control signals are decoded to control LED brightness
The values for keys 0 through 4 are detected and stored when the sketch starts
key 0 turns the LED off, the brightness increases in steps with keys 1 through 4
*/
#include <IRremote.h> // IR remote control library
const int irReceivePin = 2; // pin connected to the output of the IR detector
const int ledPin = 9; // LED is connected to a PWM pin
const int numberOfKeys = 5; // 5 keys are learned (0 through 4)
@buildcircuit
buildcircuit / LED CONTROL using Android
Created May 21, 2012 17:27
LED Control using CD4094, Android and Arduino
/* Shift Out Data
Decimal to Binary using Android Emulator
*/
int ledPin=13;
int data = 8;//Connect Pin 8 of Arduino to pin 2 of CD4094 or HEF4794
int strob = 12;//Connect Pin 12 to Pin 1 of CD4094
int clock = 10;//Connect pin 10 of Arduino to pin 3 of CD4094
int oe = 9;//Connect pin 9 of Arduino to pin 15 of CD4094
int count = 0;
@buildcircuit
buildcircuit / RGB_lamp.ino
Created October 23, 2012 15:25
RGB based Multicolor Lamp using Amarino Evaluation Shield
/*
Multicolor Lamp (works with Amarino and the MultiColorLamp Android app)
- based on the Amarino Multicolor Lamp tutorial
- receives custom events from Amarino changing color accordingly
First author: Bonifaz Kaufmann - December 2009
The source works for Amarino Evaluation shield from BuildCircuit.com
*/
@buildcircuit
buildcircuit / sensorgraph_amarino.ino
Created October 23, 2012 15:34
Sensor Graph using Amarino Evaluation shield
/*
Sends sensor data to Android
(needs SensorGraph and Amarino app installed and running on Android)
First author: Bonifaz Kaufmann - December 2009
The source works for Amarino Evaluation shield from BuildCircuit.com
*/
@buildcircuit
buildcircuit / Temperature_sensor.ino
Created October 23, 2012 15:39
LM35_temperature sensor and LED controller_ Amarino Evaluation Shield
#include <MeetAndroid.h>
MeetAndroid meetAndroid;
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 10, 9, 8, 7);
int redLed = 11;
int sensorPin = A0;
@buildcircuit
buildcircuit / orientation_sensor.ino
Created October 23, 2012 15:46
Orientation sensor_ Amarino Plugin
#include <MeetAndroid.h>
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(13, 12, 10, 9, 8, 7);
MeetAndroid meetAndroid;
int ledPin = 11;
void setup()
@buildcircuit
buildcircuit / LED_switch.ino
Created October 23, 2012 15:49
LED Switch- VT-100 Terminal Emulator
void setup() {
// Open serial communications:
Serial.begin(9600);
pinMode(11, OUTPUT);
// send an intro:
Serial.println("Enter a value");
Serial.println();
}
@buildcircuit
buildcircuit / lcdtest.ino
Created October 23, 2012 15:51
LCD Test- Amarino Evaluation Shield
// 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);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
@buildcircuit
buildcircuit / serial_display.ino
Created October 23, 2012 15:52
Serial Display_Amarino Evaluation Shield
// 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);
void setup(){
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);