Arduino SAMP speedmeter

Heare is a Speed meater by BAXX
an Arduino user.

source: http://www.smartphone-time.com/2011/09/09/arduino-samp-speedmeter/









SAMP sends vehicle speed to a php script which a program on pc reads and echoes that data to COM port, so you can plug in this speed meter to a remote pc and monitor if your friend is speeding in samp.



<-- This is computer softwere.





Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Arduino Led Fade

Fading


Demonstrates the use of the analogWrite() function in fading an LED off and on. AnalogWrite uses pulse width modulation (PWM), turning a digital pin on and off very quickly, to create a fading effect.


The Circuit




Connect the anode (the longer, positive leg) of your LED to digital output pin 9 on your Arduino through a 220-ohm resistor. Connect the cathode (the shorter, negative leg) directly to ground.





/*
 Fade

 This example shows how to fade an LED on pin 9
 using the analogWrite() function.

 This example code is in the public domain.

 */

int brightness = 0;    // how bright the LED is
int fadeAmount = 5;    // how many points to fade the LED by

void setup()  {
  // declare pin 9 to be an output:
  pinMode(9, OUTPUT);
}

void loop()  {
  // set the brightness of pin 9:
  analogWrite(9, brightness);  

  // change the brightness for next time through the loop:
  brightness = brightness + fadeAmount;

  // reverse the direction of the fading at the ends of the fade: 
  if (brightness == 0 || brightness == 255) {
    fadeAmount = -fadeAmount ;
  }  
  // wait for 30 milliseconds to see the dimming effect    
  delay(30);                          
}

Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Arduino Lcd Interface

LiquidCrystal - autoscroll

The Liquid Crystal Library allows you to control LCD displays that are compatible with the Hitachi HD44780 driver. There are many of them out there, and you can usually tell them by the 16-pin interface.
This example sketch shows how to use the autoscroll() and noAutoscroll() methods to move all the text on the display left or right.
autoscroll() moves all the text one space to the left each time a letter is added
noAutoscroll() turns scrolling off
This sketch prints the characters 0 to 9 with autoscroll off, then moves the cursor to the bottom right, turns autoscroll on, and prints them again.




Hardware Required

  • Arduino Board
  • LCD Screen (compatible with Hitachi HD44780 driver)
  • 10k Potentiometer
  • breadboard
  • hook-up wire










Code


/*
  LiquidCrystal Library - Autoscroll

 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch demonstrates the use of the autoscroll()
 and noAutoscroll() functions to make new text scroll or not.

 The circuit:
 * LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe

 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/LiquidCrystal
 */


// include the library code:
#include

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16,2);
}

void loop() {
  // set the cursor to (0,0):
  lcd.setCursor(0, 0);
  // print from 0 to 9:
  for (int thisChar = 0; thisChar < 10; thisChar++) {
   lcd.print(thisChar);
   delay(500);
  }

  // set the cursor to (16,1):
  lcd.setCursor(16,1);
  // set the display to automatically scroll:
  lcd.autoscroll();
  // print from 0 to 9:
  for (int thisChar = 0; thisChar < 10; thisChar++) {
    lcd.print(thisChar);
    delay(500);
  }
  // turn off automatic scrolling
  lcd.noAutoscroll();
 
  // clear screen for the next loop:
  lcd.clear();
}



Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Arduino Bar led Timer

The Arduino Kitchen Timer is a simple timer based around a 10 bar LED Bar Graph, with a Piezo-Electric Buzzer. A line of 10 LED's could also be used, and each LED represents a segment of 5 mins. Once the Arduino is reset the user holds a pushbutton and the Bar Graph counts up in chunks of 5 mins, until the user lets go of the button. The timer then times 5 mins, and the last LED is turned off, etc until the timer is finished. The LED bar graph then shows a display, and a piezo buzzer sounds an alarm.


The project is made by Ari Cooper Davis








Make it:
you will need:
An Arduino


Jumper Wires



A momentary push button


A 10 Bar LED Bar Graph or 10 Normal red Leds


A Piezoelectric Buzzer


A 10k resistor

Now build the circuit
Build It!

And here is the Code

/*
  Kitchen_Timer
 
 Counts up LED's on a bar graph to indicate 5 minute icrements being added to
 a timer circuit. A button is held to count up the LED's, and when the timer
 finishes the Bar Graph shows a graphic, and a piezo-electric buzzer sounds.
 
 The circuit:
 * LED bar graph attached from pins (13-3 excluding 9) to ground 
 * pushbutton attached to pin 2 from +5V
 * 10K resistor attached to pin 2 from ground
 * piezo buzzer attached to pin 9 from ground
 
 * Note: I recommend doing this on an arduino shield, as this requires a good
 amount of wire jumpers.
 
 Created in 2011 ©
 by Ari Cooper Davis [anonymouse197@gmail.com]
 http://www.instructables.com/member/anonymouse197/

 */

 // constants (const) won't change. They're used here to set pin numbers:

 const int buttonPin = 2;     // the number of the pushbutton pin
 const int ledPin =  13;      // the number of the 1st LED pin
 const int led2Pin = 12;      // the number of the 2nd LED pin
 const int led3Pin = 11;      // the number of the 3rd LED pin
 const int led4Pin = 10;      // the number of the 4th LED pin
 const int led5Pin = 8;       // the number of the 5th LED pin
 const int led6Pin = 7;       // the number of the 6th LED pin
 const int led7Pin = 6;       // the number of the 7th LED pin
 const int led8Pin = 5;       // the number of the 8th LED pin
 const int led9Pin = 4;       // the number of the 9th LED pin
 const int led10Pin = 3;      // the number of the 10th LED pin
 const int speakerOut = 9;

 // variables will change. They're used mostly for functions:

 int buttonState = 0;         // variable for reading the pushbutton status
 int tastyTimeVariable = 0;   // variable for defining time to wait
 int iVariable = 0;           // variable for repeating display alarm
 int tVariable = 0;           // variable for repeating piezo alarm

 void setup() {
  // initialize the LED pins as output pins:
  pinMode(ledPin, OUTPUT);    
  pinMode(led2Pin, OUTPUT); 
  pinMode(led3Pin, OUTPUT);
  pinMode(led4Pin, OUTPUT);    
  pinMode(led5Pin, OUTPUT); 
  pinMode(led6Pin, OUTPUT); 
  pinMode(led7Pin, OUTPUT);    
  pinMode(led8Pin, OUTPUT); 
  pinMode(led9Pin, OUTPUT); 
  pinMode(led10Pin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);     
  // initialize the piezo pin as an output
  pinMode(speakerOut, OUTPUT);
  delay(1000);
 }

void loop(){
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed. if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(ledPin, HIGH);
   } 
  else {
  }
  
  delay(1000);  // a second delay for adding time increments
  
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(led2Pin, HIGH);
   } 
  else {
  }

 delay(1000);

  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(led3Pin, HIGH);
   } 
  else {
  }
  
   delay(1000);
   
   buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(led4Pin, HIGH);
   } 
  else {
  }
  
   delay(1000);
   
   buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(led5Pin, HIGH);
   } 
  else {
  }
  
   delay(1000);
   
   buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(led6Pin, HIGH);
   } 
  else {
  }
  
   delay(1000);
   
   buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(led7Pin, HIGH);
   } 
  else {
  }
  
  delay(1000);
  
    buttonState = digitalRead(buttonPin);
   if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(led8Pin, HIGH);
   } 
  else {
  }

 delay(1000);

    buttonState = digitalRead(buttonPin);
   if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(led9Pin, HIGH);
   } 
  else {
  }

 delay(1000);

     buttonState = digitalRead(buttonPin);
    if (buttonState == HIGH) {     
    // add to timer    
    ++tastyTimeVariable;
    digitalWrite(led10Pin, HIGH);
   } 
  else {
  }

  // The above code runs to add 1 to the tastyTimeVariable if the button is
  // pressed, so that the arduino knows how long it should time for.

 delay(1000);
 
 digitalWrite(led10Pin, LOW);
 digitalWrite(led9Pin, LOW);
 digitalWrite(led8Pin, LOW);
 digitalWrite(led7Pin, LOW);
 digitalWrite(led6Pin, LOW);
 digitalWrite(led5Pin, LOW);
 digitalWrite(led4Pin, LOW);
 digitalWrite(led3Pin, LOW);
 digitalWrite(led2Pin, LOW);
 digitalWrite(ledPin, LOW);

 delay(1000);

  // The above code turns all LED's off, so as to make sure they do not
  // interfere later on in the coding.

 if (tastyTimeVariable == 0) {
 }

 else if (tastyTimeVariable == 1) {
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);  // 5 minutes. This can be changed to change increments
 }
 
 else if (tastyTimeVariable == 2) {
  digitalWrite (led2Pin, HIGH);
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);
  digitalWrite (led2Pin, LOW);
  delay(300L * 1000L);
  }

 else if (tastyTimeVariable == 3) {
  digitalWrite (led3Pin, HIGH);
  digitalWrite (led2Pin, HIGH);
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);
  digitalWrite (led3Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led2Pin, LOW);
  delay(300L * 1000L);
  }
 
 else if (tastyTimeVariable == 4) {
  digitalWrite (led4Pin, HIGH);
  digitalWrite (led3Pin, HIGH);
  digitalWrite (led2Pin, HIGH);
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);
  digitalWrite (led4Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led3Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led2Pin, LOW);
  delay(300L * 1000L);
  }
  
 else if (tastyTimeVariable == 5) {
  digitalWrite (led5Pin, HIGH); 
  digitalWrite (led4Pin, HIGH);
  digitalWrite (led3Pin, HIGH);
  digitalWrite (led2Pin, HIGH);
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);
  digitalWrite (led5Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led4Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led3Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led2Pin, LOW);
  delay(300L * 1000L);
  }
  
 else if (tastyTimeVariable == 6) {
  digitalWrite (led6Pin, HIGH);
  digitalWrite (led5Pin, HIGH); 
  digitalWrite (led4Pin, HIGH);
  digitalWrite (led3Pin, HIGH);
  digitalWrite (led2Pin, HIGH);
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);
  digitalWrite (led6Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led5Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led4Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led3Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led2Pin, LOW);
  delay(300L * 1000L);
  }
  
  else if (tastyTimeVariable == 7) {
  digitalWrite (led7Pin, HIGH);
  digitalWrite (led6Pin, HIGH);
  digitalWrite (led5Pin, HIGH); 
  digitalWrite (led4Pin, HIGH);
  digitalWrite (led3Pin, HIGH);
  digitalWrite (led2Pin, HIGH);
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);
  digitalWrite (led7Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led6Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led5Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led4Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led3Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led2Pin, LOW);
  delay(300L * 1000L);
  }
  
  else if (tastyTimeVariable == 8) {
  digitalWrite (led8Pin, HIGH);
  digitalWrite (led7Pin, HIGH);
  digitalWrite (led6Pin, HIGH);
  digitalWrite (led5Pin, HIGH); 
  digitalWrite (led4Pin, HIGH);
  digitalWrite (led3Pin, HIGH);
  digitalWrite (led2Pin, HIGH);
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);
  digitalWrite (led8Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led7Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led6Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led5Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led4Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led3Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led2Pin, LOW);
  delay(300L * 1000L);
  }
  
  else if (tastyTimeVariable == 9) {
  digitalWrite (led9Pin, HIGH);
  digitalWrite (led8Pin, HIGH);
  digitalWrite (led7Pin, HIGH);
  digitalWrite (led6Pin, HIGH);
  digitalWrite (led5Pin, HIGH); 
  digitalWrite (led4Pin, HIGH);
  digitalWrite (led3Pin, HIGH);
  digitalWrite (led2Pin, HIGH);
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);
  digitalWrite (led9Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led8Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led7Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led6Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led5Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led4Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led3Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led2Pin, LOW);
  delay(300L * 1000L);
  }
  
  else if (tastyTimeVariable == 10) {
  digitalWrite (led10Pin, HIGH);
  digitalWrite (led9Pin, HIGH);
  digitalWrite (led8Pin, HIGH);
  digitalWrite (led7Pin, HIGH);
  digitalWrite (led6Pin, HIGH);
  digitalWrite (led5Pin, HIGH); 
  digitalWrite (led4Pin, HIGH);
  digitalWrite (led3Pin, HIGH);
  digitalWrite (led2Pin, HIGH);
  digitalWrite (ledPin, HIGH);
  delay(300L * 1000L);
  digitalWrite (led10Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led9Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led8Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led7Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led6Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led5Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led4Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led3Pin, LOW);
  delay(300L * 1000L);
  digitalWrite (led2Pin, LOW);
  delay(300L * 1000L);
  }
  
  else if (tastyTimeVariable > 10)  {
  }
  
  if (tastyTimeVariable == 0)  {
  }
  
  else {
    
    for(int iVariable = 0; iVariable < 1000; iVariable++) { // alarm length
    
  digitalWrite(ledPin, HIGH);
  delay(100);
  digitalWrite(led2Pin, HIGH);
  delay(100);
  digitalWrite(led3Pin, HIGH);
  digitalWrite(ledPin, LOW);
  delay(100);
  digitalWrite(led4Pin, HIGH);
  digitalWrite(led2Pin, LOW);
  delay(100);
  digitalWrite(led5Pin, HIGH);
  digitalWrite(led3Pin, LOW);
  delay(100);
  digitalWrite(led6Pin, HIGH);
  digitalWrite(led4Pin, LOW);
  delay(100);
  digitalWrite(led7Pin, HIGH);
  digitalWrite(led5Pin, LOW);
  delay(100);
  digitalWrite(led8Pin, HIGH);
  digitalWrite(led6Pin, LOW);
  delay(100);
  digitalWrite(led9Pin, HIGH);
  digitalWrite(led7Pin, LOW);
  delay(100);
  digitalWrite(led10Pin, HIGH);
  digitalWrite(led8Pin, LOW);
  delay(100);
  digitalWrite(led9Pin, LOW);
  delay(100);
  digitalWrite(led10Pin, LOW);
  delay(400);
  
  // The above code creates a loading bar effect with the LED's
  
  for(int tVariable = 0; tVariable < 5; tVariable++) {  // another loop function
    analogWrite(speakerOut, 150);
    delay(50);
    analogWrite(speakerOut, 0);
    delay(50);
    analogWrite(speakerOut, 5);
    delay(50);
    analogWrite(speakerOut, 0);
    delay(50);
    }
    
    // The above code creates a buzzer noise alarm
    
   }
  }
  
}
And at last the proof Video
Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Breadboard Sanguino




Parts
Breadboard


Atmega644


16MHz crystal


momentary switch


4 x .1uF capacitor









2 x 22pF capacitor


10K resistor


And some wire.

Put the bread board down vertically. Row 1 at top, blue rail left, red rail right.
Place the 644p into the bread board. Pin 1 into bread board hole 10D.
Place the momentary switch's pins into bread board 1D, 1F, 3D, and 3F.
Place the crystal into rows 31E and 33E
Place a .1 uF cap from 9E to 9F. This is the reset on RTS cap. We'll be "building" a serial port on the left side, rows 4-9.
Place a .1 uF cap from 18I to 19I. Decouple AREF from AGND.
Place a .1 uF cap from 19I to 20I. Decouple AVCC from AGND. Yep, 19I, has 2 cap leads in it. It's a tight fit but can be done.
Place a .1 uF cap from 19C to 20C. Decouple VCC from GND.
Place 10K resistor from left VCC rail to 18A. This is the pull up resistor for RESET. Strictly speaking it isn't necessary. The 644p has an internal pull up resistor. But it's a little tiny one. Common practice seems to be to use a bigger one off chip.
Place a 22pf capacitor from left GND rail to 31A.
Place a 22pf capacitor from left GND rail to 33A.
Breadboard Sanguino




** Wires **
1A to left GND. Part of the reset circuit from momentary switch to ground. Pressing switch connects reset to ground, resetting the chip. Also bridges GND from left GND rail to right GND rail through momentary switch.
1J to right GND rail.
3C to 9B. This will carry RESET from the RESET cap to the momentary switch.
4J to GND. Carry GND to serial port.
6J to VCC. Carry VCC to serial port.
7A to 23A, and 7E to 7G. Bring Rx to serial port.
8A to 24A, and 8E to 8G. Bring Tx to serial port.
9C to 18C. Bring RESET from chip to reset cap.
18J to right VCC. AREF.
19A to left VCC, chip VCC.
19J to right GND. AGND.
20A to left GND, chip GND.
20J to right VCC. AVCC.
21C to 31C. XTAL from chip to crystal.
22C to 33C. XTAL from chip to crystal.




Serial "port" is on the breadboard side B, column h, rows 4-9. FTDI USB cable black wire to row 4, green to row 9.
The FTDI cable has a female header. The short side of a male header is too short to fit into the breadboard. Easiest if you have them, is to use double length male headers to connect FTDI female connector to bread board hole. More likely you'll need to take two of the 6 pin male headers, and solder the short legs to each other. See the picture. Normally I use shrink fit tubing over bare wire after I solder to protect against shorts. But, there's no way to get them on in this case. So just solder REAL carefully.
To use the serial port, plug the FTDI cable into your computer and into the double sided male header you just created, which in turn is placed into the breadboard.


ICSP "port" is on side A, column B, rows 15-20.
Both the AVR MK-ISP2 and the USBTiny use a 6 pin ICSP female header, in a 2 row by 3 pin configuration. We need to make a cable going from a 2x3 male header to a 1x6 male header. We need to make the following cable using text mode "art":
Note, we are looking at the 2x3 header from the bottom. That is, at the pins.
To construct this cable, use either a crimping tool or solder. If you solder, split the ribbon cable back far enough that you can get in a bit of heatshrink without it shrinking when you solder the wire to the short side of the pin. After the wire is soldered, pull down the heat shrink to cover the joint, then shrink the tubing.
To use the ICSP port, plug your programmer into your computer, and the converter cable you created above into the 2x3 female connector of the programmer's cable. Green pin is pin 1, black is pin 6. Now plug the 1x6 end of the converter cable into the breadboard. Grey pin in hole 15B, Black in hole 20B.
Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Build a Sanguino

For Building an Sanguino you will need the Sanguino kit, you can bay it here :
flickr:2692845866
Sanguino Kit




Mounting Instructions :


This is the Sanguino PCB
flickr:2692845594


These Are The Components :
flickr:2692845866


Solder Pin Headers

The pin headers are supposed to point down so you can insert the Sanguino into a breadboard. Make sure they are soldered in straight (perpendicular to the board.) An easy way to do this is to solder in one pin on each end of the row so that you can easily adjust them. Once they are straight, solder the rest of the pins.
flickr:2692846066






10K resistor

Solder the resistor in any orientation. It is marked brown / black / orange.
flickr:2692036223

22pF capacitors

These are the tiny yellow capacitors. They can be soldered in any orientation.
flickr:2692036679

Serial Headers

Solder in the right-angle headers into the end of the board as shown.
flickr:2692850594

40-pin DIP Socket

Line up the DIP socket so that the dimple on one end lines up with the dimple on the silkscreen. Solder each pin in.
flickr:2692037247


Red and Green LEDs

The LEDs need to be inserted in the proper orientation. The short leg of the LED goes into the flat side of the LED silkscreen.
flickr:2692037507


16mhz Crystal

This is the crystal oscillator. It may be soldered in any orientation.
flickr:2692037757


1N4001 Diode

This is the polarity protection diode. It needs to be soldered in in the proper orientation. There is a band on the diode. Line it up with the band on the silkscreen and solder it in.flickr:2692038115

Reset Button

The button can only be inserted into the PCB in one orientation. Insert it and then solder it in.
flickr:2692852084


1K Resistors

These are the resistors for the LEDs. They need to be mounted vertically, so bend one lead over and solder the resistors into the board.
flickr:2692038635


100nF Ceramic Capacitors

The ceramic capacitors can be soldered in any orientation. There are 4 of them. Solder them all in.
flickr:2692039005


Auto Reset Jumper Header

This is the jumper to enable/disable autoreset. Solder in a 2-pin header. It helps if its soldered in straight.
Put the jumper onto the header you just soldered it on. This enables the auto-reset functionality.
THIS IS IMPORTANT:
If you skip this step, you'll have to press reset every time before you upload your sketch.
flickr:2692853126


Power Selector

This switch allows you to choose between USB and External power. Solder it in any orientation.
flickr:2692853746


JTAG Header

This is the header to access the JTAG functionality. There is a notch in the IDC header that should line up with the silkscreen.
flickr:2692040215


DC Power Jack

This is the jack for power input. It will take quite a bit of solder to solder it into place, so don't be shy.
flickr:2692040439


ICSP Header

This is the header to directly flash the atmega644P chip. The pins can be soldered in any direction.
flickr:2692040891


100uF Electrolytic Capacitors

These capacitors need to be soldered in the proper orientation. One side is marked as negative. The other pin is positive. Insert the positive leg in the side marked positive. It should look like that pictures.
flickr:2692854890


7805

This is the power regulator. Solder it so that the metal backing tab faces outwards.
flickr:2692041511


Insert atmega644P

Now is time to insert the atmega644P chip. Line the dimple up with the socket (and more importantly the silkscreen). Take care to not break / severely bend any legs as you insert it.
flickr:2692042043

Now you can use it!


Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Sanguino

flickr:2692856142

Sanguino is an open source hardware like Arduino( infect it use the Arduino Ide)but it has some additional I/O pins for example it has 32 total general purpose I/O pins, 64K flash memory, 2K EEPROM etc.. the Main Processor is atmega644P and obviously its 100% open source.


Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

When music meets Arduino


A beautiful project by [Leigh Davis]. It is a brilliant proof of how Arduino fits into virtually any sphere of thought and is the shortest path for a creator realizing his idea in reality.
He writes:
I began the first few days by developing a stand alone application build in MaxMSP that understands the notes that a play on my (recently purchased second-hand) flute. I set the range from low C right up to the 3rd octave D. Each note of the chromatic scale triggers a bang, which is coloured uniquely to the other notes bang messages.
The bang message then sets the corresponding color to the display screen on the application. Which will in turn send a signal to the arduino to dispense the corresponding oil color on water according to the different notes. (Something like a physical Milkdrop!)He further plans to control different LEDs, motors and the likes using the Rayne application.


Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Hello
Today i've re build my old project.
Here is the schematic :
You can use any type of ir receiver with your arduino, i've use an old ir receiver form my brooked tv.
after Wiring up all upload this code into your Arduino:


/* 5 Channel ir remote control
Created by Asghar Furqan
A fully open-sourse program!

---------------------------------------------------------
circuit:
ir module connected to pin 2(Digital)
led 1-2-3-4-5 connected to pin 3-4-5-6-7
*/



#include

int RECV_PIN = 2;
int led1 = 7;
int led2 = 3;
int led3 = 4;
int led4 = 5;
int led5 = 6;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the ir receiver
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT);
pinMode(led4, OUTPUT);
pinMode(led5, OUTPUT);
}

void loop() {


if (irrecv.decode(&results)) {
Serial.println(results.value, DEC);


if(results.value == 16705559) //if you want to configure with your remote controll change the results.value
digitalWrite(led1, HIGH); // set the LED on
if (irrecv.decode(&results)) {
Serial.println(results.value, DEC);
if(results.value == 16656599)
digitalWrite(led1, LOW); // set the LED off

irrecv.resume(); // Receive the next value

if(results.value == 16672919)
digitalWrite(led2, HIGH); // set the LED on
if(results.value == 16697399)
digitalWrite(led2, LOW); // set the LED off

irrecv.resume(); // Receive the next value

if(results.value == 16689239)
digitalWrite(led3, HIGH); // set the LED on
if(results.value == 16664759)
digitalWrite(led3, LOW); // set the LED off

irrecv.resume(); // Receive the next value

if(results.value == 16668839)
digitalWrite(led4, HIGH); // set the LED on
if(results.value == 16676999)
digitalWrite(led4, LOW); // set the LED off

irrecv.resume(); // Receive the next value

if(results.value == 16674959)
digitalWrite(led5, HIGH); // set the LED on
if(results.value == 16650479)
digitalWrite(led5, LOW); // set the LED off

irrecv.resume(); // Receive the next value

}

}
}

 


Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Arduino And motor shield

Introduction




Arduino is a great starting point for electronics, and with a motor shield it can also be a nice tidy platform for robotics and mechatronics. Here is a design for a full-featured motor shield that will be able to power many simple to medium-complexity projects.
  • 2 connections for 5V 'hobby' servos connected to the Arduino's high-resolution dedicated timer - no jitter!
  • Up to 4 bi-directional DC motors with individual 8-bit speed selection (so, about 0.5% resolution)
  • Up to 2 stepper motors (unipolar or bipolar) with single coil, double coil, interleaved or micro-stepping.
  • 4 H-Bridges: L293D chipset provides 0.6A per bridge (1.2A peak) with thermal shutdown protection, 4.5V to 36V
  • Pull down resistors keep motors disabled during power-up
  • Big terminal block connectors to easily hook up wires (10-22AWG) and power
  • Arduino reset button brought up top
  • 2-pin terminal block to connect external power, for seperate logic/motor supplies
  • Tested compatible with Mega, Diecimila, & Duemilanove



How to use


      DC motors



DC motors are used for all sort of robotic projects. The motor shield can drive up to 4 DC motors bi-directionally. That means they can be driven forwards and backwards. The speed can also be varied at 0.5% increments using the high-quality built in PWM. This means the speed is very smooth and won't vary!
Note that the H-bridge chip is not really meant for driving loads over 0.6A or that peak over 1.2A so this is for small motors. Check the datasheet for information about the motor to verify its OK.
To connect a motor, simply solder two wires to the terminals and then connect them to either the M1, M2, M3, or M4. Then follow these steps in your sketch
  1. Make sure you include 
  2. Create the AF_DCMotor object with AF_DCMotor(motor#, frequency), to setup the motor H-bridge and latches. The constructor takes two arguments.
    The first is which port the motor is connected to, 1, 2, 3 or 4
    frequency
     is how fast the speed controlling signal is.
    For motors 1 and 2 you can choose MOTOR12_64KHZ, MOTOR12_8KHZ, MOTOR12_2KHZ, or MOTOR12_1KHZ. A high speed like 64KHz wont be audible but a low speed like 1KHz will use less power. Motors 3 & 4 are only possible to run at 1KHz and will ignore any setting given
  3. Then you can set the speed of the motor using setSpeed(speed) where the speed ranges from 0 (stopped) to 255 (full speed). You can set the speed whenever you want.
  4. To run the motor, call run(direction) where direction is FORWARDBACKWARD or RELEASE. Of course, the Arduino doesn't actually know if the motor is 'forward' or 'backward', so if you want to change which way it thinks is forward, simply swap the two wires from the motor to the shield.
Code


#include 


AF_DCMotor motor(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Motor test!");
  
  motor.setSpeed(200);     // set the speed to 200/255
}

void loop() {
  Serial.print("tick");
  
  motor.run(FORWARD);      // turn it on going forward
  delay(1000);

  Serial.print("tock");
  motor.run(BACKWARD);     // the other way
  delay(1000);
  
  Serial.print("tack");
  motor.run(RELEASE);      // stopped
  delay(1000);
}
Read more »
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati