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
/* This is a simple way to use one potentiometer to get varying colors out of a common-cathode RGB LED | |
Check out this sketch to cycle through millions of colors: https://gist.github.com/jamesotron/766994 | |
*/ | |
int sensorPin = A0; // connect a sensor or potentiometer to analog input A0 | |
int sensorValue = 0; | |
int redPin = 3; // use PWM outputs on digital pins 3, 5, 6 - connect to RGB LED via 220 Ohm resistors | |
int greenPin = 5; | |
int bluePin = 6; |
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
// a project by Glen p yeldho | |
// for more info and updates https://www.facebook.com/glenp.yeldho | |
// http://www.instructables.com/id/Simple-Arduino-POV-/ | |
// Edited by GreenMoonArt to spell "TECH_" | |
// Connect 5 LEDs to Arduino digital pins 2, 3, 4, 5, and 6 via 200 Ohm resistors | |
// Upload the code and shake the breadboard with the LEDs on it. | |
// Vary the shaking frequency until you can see text formed by the LEDs. | |
int _[] = {0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0}; | |
int A[] = {0,1,1,1,1, 1,0,1,0,0, 0,1,1,1,1}; |
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
/* YourDuino Basic Robot Kit V2 User EDitable Software Sketch | |
How To Page that goes with this Software Sketch: | |
http://arduino-info.wikispaces.com/Robot+Commands | |
WHAT IT DOES: | |
- Runs the robot motors | |
- Program the robot to make different moves such as Forward, SpinRight, Back etc. | |
- SEE the comments after "//" on each line below | |
- V2.20 3/27/2015 maryalice@yourduino.com | |
Questions: terry@yourduino.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
/* YourDuino Basic Robot Kit V2 Motor Speed Test | |
http://yourduino.com/sunshop2/index.php?l=product_detail&p=400 | |
source: https://arduino-info.wikispaces.com/YourDuino-Basic-Robot-Kit-Software-Version2 | |
- WHAT IT DOES: | |
- Runs the robot motors at different speeds. Helps adjust Right-Left offsets | |
- SEE the comments after "//" on each line below | |
This test sketch will run the robot in slow, medium and fast speeds. You should place it on a smooth floor if possible. |
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
/* YourDuino Basic Robot Kit V2: Test Servo movement | |
- WHAT IT DOES: Tests the servo by commanding it to go to several different directions | |
to "Look Around". You may want to reposition the servo arm on the servo to get the | |
positions to look around correctly. | |
- SEE the comments after "//" on each line below | |
- CONNECTIONS: | |
- | |
- | |
- V2.10 11/10/2014 | |
Questions: terry@yourduino.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
// Install NewPing library: https://bitbucket.org/teckel12/arduino-new-ping/downloads/NewPing_v1.7.zip | |
// https://bitbucket.org/teckel12/arduino-new-ping/wiki/Home | |
/* YourDuino Basic Robot Kit V2: Ultrasonic Sensor Test | |
- WHAT IT DOES | |
- Tests the operation of the Ultrasonic Sensor | |
- SEE the comments after "//" on each line below | |
- CONNECTIONS: (suggest cable with 4 wires: Red,Orange,Yellow,Green ) | |
- Sensor Vcc to RoboRED Vcc (Red) |
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
// Hook up a buzzer and use it to indicate when your robot is backing up | |
// source: http://forum.arduino.cc/index.php?topic=3757.0 | |
#define BZZR 4 //digital pin to hook buzzer's red wire to | |
void setup() { | |
pinMode(BZZR, OUTPUT); //set the buzzer as output | |
} | |
void loop() { |
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
// Install motor driver library: http://yourduino.com/docs/A_YD_Motor1.zip | |
/* YourDuino.com Example Software Sketch | |
MotorDriverDEV | |
YD_MotorDriver1 Library Test | |
source: https://arduino-info.wikispaces.com/YourDuino-Basic-Robot-Kit-Software-Version2 | |
terry@yourduino.com | |
Note: If you have the motors connected properly you should first see the right-hand motor go forward and then reverse, | |
followed by the left-hand motor going forward and then reverse. If a motor is rotating in the wrong direction, |
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
// download library from: https://github.com/pololu/qtr-sensors-arduino | |
#include <QTRSensors.h> | |
#define NUM_SENSORS 6 // number of sensors used | |
#define TIMEOUT 2500 | |
#define EMITTER_PIN QTR_NO_EMITTER_PIN // digital pin 2 is often used, but not necessary | |
// sensor connected through analog pins A0 - A5 i.e. digital pins 14-19 | |
// note: the next two lines are really one line of code – it may be word-wrapped in your browser | |
QTRSensorsRC qtrrc((unsigned char[]) {14, 15, 16, 17, 18, 19}, NUM_SENSORS, TIMEOUT, EMITTER_PIN); |
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
// hint: see how this person changed the code for their robot: http://www.techbitar.com/fast-line-following-robot.html | |
#include <QTRSensors.h> | |
#include <YD_MotorDriver1.h> | |
#define NUM_SENSORS 6 // number of sensors used | |
#define TIMEOUT 2500 | |
#define EMITTER_PIN QTR_NO_EMITTER_PIN // or 2 if you want to use this feature | |
#define Motor1A 8 |
OlderNewer