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
/* | |
* Arduino Code for | |
* Simple Talking Intruder Alert System | |
* | |
* Abhik Pal | |
*/ | |
#define pirPin 7 // PIR Sensor connected to pin 7 | |
#define ledPin 13 // LED connected to pin 13 |
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
/* | |
* Interfacing Arduino from Processing | |
* Example 1 Arduino Sketch | |
* | |
* The Arduino listens for any data on the serial buffer. | |
* If any data is received it is stored in a char-variable. | |
* If the received value is 'H' then the led is turned on and | |
* if the received value is 'L' then the LED is turned off. | |
* No action is taken for other values. | |
* |
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
/* | |
* Music Visualizer ver2 | |
* This sketch extracts values from the input audio stream | |
* which happens to give the same values as our output | |
* stream as "Stereo Mix" has been set as the default device. | |
* The values are used to draw waveforms representing the | |
* average, left and right channels and send the values to an | |
* Arduino which changes the brightness of a LED. | |
* This is an upgrade to the previous Music Visualizer Project | |
* at : http://theblubot.blogspot.com/2014/01/simple-music-visualizer.html |
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
/* | |
* Joystick and the serial monitor. | |
* | |
* This sketch outputs data from the joystick at 9600 baud to the 'Serial Monitor' (the serial | |
* monitor needs to be opened to view this data). | |
* | |
* CIRCUIT: | |
* - Joystick VCC to Arduino 5V, joystick GND to Arduino GND | |
* - Joystick vertical axis to A0, horizontal to A1 | |
* - Joystick pushbutton connected to digital pin 2 using a pull-up resistor |
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
/* | |
* OBSTACLE AVOIDER ROBOT | |
* | |
* A simple Arduino based obstacle avoider robot that uses two infrared distance sensors to | |
* "look for" obstacle and change its behavior accordingly. If the robot detects an obstacle to its | |
* left, it turns clockwise; if the obstacle is on the right, it turns anti-clockwise; and moves | |
* forward if no obstacle is found. | |
* | |
* Abhik Pal | |
* (abhik@ardubotics.com) |
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
/* | |
* BASIC ARDUBOT | |
* | |
* A simple Ardubot that demonstrates a basic set of movements. | |
* | |
* Abhik Pal | |
* (abhik@ardubotics.com) | |
* | |
* Released under The MIT License (MIT) | |
*/ |
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
/* | |
* Callibration sketch for the accelerometer. | |
* | |
* Simply prints out the values from the x, y, and z axes to the serial monitor. These values can be | |
* used to calibrate the sensor. | |
* | |
* To use this code with the tilt controlled robot, keep the accelerometer flat and then record the | |
* readings for x and the y axes. The calibrated_x and calibrated_y in the tilt-robot sketch should | |
* be set to these base values. | |
* |
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
/* | |
* LINE FOLLOWER ROBOT | |
* | |
* An Arduino based robot that uses an infrared sensor array to follow a line. | |
* | |
* Abhik Pal | |
* (abhik@ardubotics.com) | |
* | |
* Released under The MIT License (MIT) | |
*/ |
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
/* | |
* LIGHT AVOIDER ROBOT | |
* | |
* A simple Arduino based obstacle avoider robot that uses two light dependent resistors to | |
* measure the amount of light in its environment and then move to the area with less light. | |
* | |
* Abhik Pal | |
* (abhik@ardubotics.com) | |
* | |
* Released under The MIT License (MIT) |
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
const int num_relays = 8; | |
const int relays[] = {2, 3, 4, 5, 6, 7, 8, 9}; | |
const int duration = 1000; | |
void setup() { | |
for (int i = 0; i < num_relays; i++) { | |
pinMode(relays[i], OUTPUT); | |
digitalWrite(relays[i], HIGH); | |
} |
OlderNewer