Things used in this project

Hardware components:
Ardgen 101
Arduino 101 & Genuino 101
×1
Ir
Infrared Module for Tessel
×1
09590 01
LED (generic)
×1
Mxp breadboard obl 600  57849.1449786488.500.659
Digilent Breadboard Expansion for NI myRIO
×1
Mcp23008 i2cio4r4g5le 10a d 1 1024x1024 s8wwqgnv5c
ControlEverything.com 4-CHANNEL RELAY CONTROLLER FOR I2C
×1
Jumper
×1
Software apps and online services:
Ide web
Arduino IDE
Hand tools and fabrication machines:
Obeng

Custom parts and enclosures

Menyalakan Lampu Menggunakan Sensor InfraRed dan Arduino
xiaoying_video_1503639094960_fdd0NN4Vwo.mp4

Schematics

Menyalakan Lampu Menggunakan Sensor InfraRed dan Arduino
Photogrid 1503638763189 eoap9ivrxm

Code

CodingArduino
#include "Arduino.h"


class Pronto {

  public:

    Pronto(int pin);

    void ir_start(uint16_t *code);

    void handleInterrupt(); //Interrupt Timer Overflow Function

  private:

    int _pin;

    void ir_on();

    void ir_off();

    void ir_toggle();

    void ir_stop();

};
CodingArduino
#include <Ultrasonic.h>


Ultrasonic ultrasonic(5,6); // (Trig PIN,Echo PIN)


void setup() {

Serial.begin(9600);

pinMode(4, OUTPUT); // VCC pin

pinMode(7, OUTPUT); // GND ping

digitalWrite(4, HIGH); // VCC +5V mode 

digitalWrite(7, LOW); // GND mode

}


void loop()

{

Serial.print(ultrasonic.Ranging(CM)); // CM or INC

Serial.println(" cm" );

delay(100);

}

Credits

E383e9b9e698d59f2e5e0f8c5b7cf276
Yulinar Angreasti
1 project • 0 followers
15650021
Contact

Comments

Add projectSign up / Login