This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include | |
#define TRIGGER_PIN 12 | |
#define ECHO_PIN 11 | |
#define MAX_DISTANCE 200 | |
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. | |
void setup() { | |
Serial.begin(9600); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created by Rui Santos, http://randomnerdtutorials.com | |
* | |
* Complete Guide for Ultrasonic Sensor HC-SR04 | |
* | |
Ultrasonic sensor Pins: | |
VCC: +5VDC | |
Trig : Trigger (INPUT) - Pin11 | |
Echo: Echo (OUTPUT) - Pin 12 | |
GND: GND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created by Rui Santos, http://randomnerdtutorials.com | |
* | |
* Complete Guide for Ultrasonic Sensor HC-SR04 | |
* | |
Ultrasonic sensor Pins: | |
VCC: +5VDC | |
Trig : Trigger (INPUT) - Pin11 | |
Echo: Echo (OUTPUT) - Pin 12 | |
GND: GND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created by Rui Santos, http://randomnerdtutorials.com | |
* Temperature Sensor Displayed on 4 Digit 7 segment common anode | |
* 2013 | |
*/ | |
const int digitPins[4] = { | |
4,5,6,7}; //4 common anode pins of the display | |
const int clockPin = 11; //74HC595 Pin 11 | |
const int latchPin = 12; //74HC595 Pin 12 | |
const int dataPin = 13; //74HC595 Pin 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created by Rui Santos, http://randomnerdtutorials.wordpress.com | |
* Control DC motor with Smartphone via bluetooth | |
* 2013 | |
*/ | |
int motorPin1 = 3; // pin 2 on L293D IC | |
int motorPin2 = 4; // pin 7 on L293D IC | |
int enablePin = 5; // pin 1 on L293D IC | |
int state; | |
int flag=0; //makes sure that the serial only prints once the state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created by Rui Santos, http://randomnerdtutorials.wordpress.com | |
* Control a servo motor with Visual Basic | |
* 2013 | |
*/ | |
#include <Servo.h> | |
Servo myservo; // create servo object to control a servo | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* IRremote Library - Copyright 2009 Ken Shirriff | |
* created by Rui Santos, http://randomnerdtutorials.wordpress.com | |
* Control LED's with a remote control | |
* 2013 | |
*/ | |
#include <IRremote.h> | |
int IR_Recv = 3; //IR Receiver Pin 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* created by Rui Santos, http://randomnerdtutorials.wordpress.com | |
* Ultrasonic Sensor with LED's bar graph and buzzer | |
* 2013 | |
*/ | |
int tonePin = 4; //Tone - Red Jumper | |
int trigPin = 9; //Trig - violet Jumper | |
int echoPin = 10; //Echo - yellow Jumper | |
int clockPin = 11; //IC Pin 11 - white Jumper | |
int latchPin = 12; //IC Pin 12 - Blue Jumper |