Skip to content

Instantly share code, notes, and snippets.

@buildcircuit
buildcircuit / gist:2758308
Last active Oct 5, 2015
Simple IR sensor using Arduino
View gist:2758308
/*
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 Oct 5, 2015
PWM control signals using Arduino and Infrared
View gist:2758364
/*
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
LED Control using CD4094, Android and Arduino
View LED CONTROL using Android
/* 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 Oct 23, 2012
RGB based Multicolor Lamp using Amarino Evaluation Shield
View RGB_lamp.ino
/*
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 Oct 23, 2012
Sensor Graph using Amarino Evaluation shield
View sensorgraph_amarino.ino
/*
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 Oct 23, 2012
LM35_temperature sensor and LED controller_ Amarino Evaluation Shield
View Temperature_sensor.ino
#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 Oct 23, 2012
Orientation sensor_ Amarino Plugin
View orientation_sensor.ino
#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 Oct 23, 2012
LED Switch- VT-100 Terminal Emulator
View LED_switch.ino
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 Oct 23, 2012
LCD Test- Amarino Evaluation Shield
View lcdtest.ino
// 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 Oct 23, 2012
Serial Display_Amarino Evaluation Shield
View serial_display.ino
// 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);