Show Posts
Pages: 1 ... 372 373 [374] 375 376 ... 542
5596  Using Arduino / Storage / Re: Magnetic stripe card writer and reader with Arduino on: February 06, 2012, 11:59:31 am
Do you think this can be useful for me?

http://www.sparkfun.com/products/8634

It reads and writes, so i can use the same device to perform both the operations.

You'll need to figure out how to power it (Arduino doesn't have a PS2 port) and you may need level shifters (MAX232) to connect to the RS232 cable or find internal Serial TTL signals you can use.

You can get similar reader/writers on eBay for about the same price.
5597  Using Arduino / LEDs and Multiplexing / Re: Help controlling a 4x9 LED matrix and identifying components on: February 06, 2012, 11:35:04 am
Your cheap headlamp has a very poor circuit:  9 LED's in parallel and only one current limiting resistor.  There is no guarantee that the curren through the resistor is shared evenly. You can measure the voltage drop across the LED's to get that.  Subtract that from 4.5V (the supply voltage) and divide by 2.2 to get total current (in Amps).  Divide again by 9 to get the (intended) current through each LED. That will give you the two values you need to design any LED circuit: forward voltage drop and current.
5598  Development / Suggestions for the Arduino Project / Re: Arduino board suggestions for a keyboard project on: February 06, 2012, 11:23:57 am
"LCARS" is the touch-screen interface use throughout the starship Enterprise in Star Trek: Next Generation.

Have you chosen the touchscreen hardware yet?  Depending on the interface to the touchscreen you ma want a very small or a very capable Arduino.
5599  Using Arduino / Programming Questions / Re: errors with "arduino brain library" on: February 06, 2012, 11:12:21 am
You have to install the Brain library.  Put the library files in {your sketch folder}/libraries/Brain/

This might be what you need: https://github.com/kitschpatrol/Arduino-Brain-Library/downloads
5600  Using Arduino / Project Guidance / Re: pulseIn questions on: February 06, 2012, 10:02:01 am
The default timeout is 1 second.  If you wait more then one second before pushing the button OR you hold it down for more than one second you will get a 0 return which means TIMEOUT.

Try pulseIn(pin, HIGH, 100000000UL) for a 100-second timeout.
5601  Using Arduino / Project Guidance / Re: Arduino + Transmitter + receiver basic tutorial on: February 06, 2012, 09:44:29 am
There's this one:

http://www.creativeapplications.net/sound/wireless-arduino-of-tutorial/

Typically you would use the VirtualWire library:
http://www.open.com.au/mikem/arduino/
5602  Using Arduino / Programming Questions / Re: Cant upload program through Bluetooth on: February 06, 2012, 09:31:20 am
I would guess that either the Auto Reset is not implemented and/or the baud rate is wrong for the bootloader.
5603  Development / Suggestions for the Arduino Project / Re: arduino uno rev 4 on: February 06, 2012, 09:16:13 am
I think you mean "ZIF"  (Zero Insertion Force) socket.
5604  Using Arduino / Sensors / Re: how to use a mma7361 accelerometer what is wrong? on: February 06, 2012, 08:59:09 am
For a little more versatility:
Code:
const int STABILITY = 10;

long axe_x=0;
long axe_y=0;
long axe_z=0;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  axe_x = ((STABILITY-1)* axe_x + analogRead(A0)) / STABILITY;
  axe_y = ((STABILITY-1)* axe_y + analogRead(A1)) / STABILITY;
  axe_z = ((STABILITY-1)* axe_z + analogRead(A2)) / STABILITY;

  Serial.println(axe_x);
  Serial.println(axe_y);
  Serial.println(axe z);
}
5605  Using Arduino / General Electronics / Re: Help !!! Smart GPU Questions on: February 05, 2012, 04:09:06 pm
The site is primarily Adobe Flash which may explain why it doesn't work on your phone.
5606  Using Arduino / General Electronics / Re: Help !!! Smart GPU Questions on: February 05, 2012, 03:55:26 pm
Go to this page:

http://vizictechnologies.com/#/software-demos-sg/4554679040

Click on the two download buttons labeled "arduino".
5607  Using Arduino / Programming Questions / Re: Obsolete io macros, avr-gcc... what is the alternative on: February 05, 2012, 03:40:04 pm
DDRB = 0x06;  //  Set pins 1 and 2 for OUTPUT and the rest for INPUT

PORTB |= 0x02;  //  Set OUTPUT pin 1 HIGH
PINB = 0x02;  //  Toggle OUTPUT pin 1

PORTB &= ~0x04;   // Set OUTPUT pin 2 LOW
 
mypin = PINB & 0x01;  // test if IMPUT pin 0 is HIGH
5608  Using Arduino / Programming Questions / Re: Trouble with counter on: February 05, 2012, 03:22:01 pm
I just tried the amended code and it seems to work correctly now for me, too.

Perhaps a comparison between the two would point to the problem.
5609  Using Arduino / Networking, Protocols, and Devices / Re: I2C - Write as Slave on: February 05, 2012, 03:16:10 pm
Code:
If I were going to attempt this, this is what I'd try:
{code]
#include <Wire.h>

const int I2cLocalDeviceID = 42;  // My local device ID is 42

unsigned char RequestedRegister;

void setup()
{               
  Serial.begin(9600);
  Wire.begin(I2cLocalDeviceID); // Initialize I2C as slave with LocalDeviceID
  Wire.onReceive(ReceiveEvent);
  Wire.onRequest(RequestEvent);
}

void loop()
{
}

// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void ReceiveEvent(int howMany)
{
  Serial.println("ReceiveEvent: howMany=");
  Serial.println(howMany);

  if(howMany == 1)  // Read register
  {
    RequestedRegister = Wire.read();
    Serial.print("command = Read Register #");
    Serial.println(RequestedRegister);
  }
  else
    if (howMany == 3)  // Write register
    {
      RequestedRegister = Wire.read();
      Serial.print("command = Write Register #");
      Serial.println(RequestedRegister);
      unsigned int value = Wire.read() << 8 | Wire.read();  // Get two byte value
      switch(RequestedRegister)
      {
      case 0:
        Serial.print("Register 0 = 0x");
        Serial.println(value, HEX);
        break;
      case 1:
        Serial.print("Register 1 = 0x");
        Serial.println(value, HEX);
        break;
      case 2:
        Serial.print("Register 2 = 0x");
        Serial.println(value, HEX);
        break;
      default:
        Serial.println("Write unknown register!");
      }
    }
    else // empty the receive buffer
    for (int i=0; i<howMany; i++)
      Wire.read();
}

void RequestEvent()
{
  Serial.println("RequestEvent");

  switch(RequestedRegister)
  {
  case 128:
    Serial.println("AHH 128");
    Wire.write(0x35);
    break;
  case 129:
    Serial.println("AHH 129");
    Wire.write(0x35);
    break;
  case 130:
    Serial.println("AHH 130");
    Wire.write(0x35);
    break;
  default:
    Serial.println("Read unknown register");
  }
}
5610  Using Arduino / Networking, Protocols, and Devices / Re: I2C - Write as Slave on: February 05, 2012, 12:06:02 pm
There are some devices that are expecting ACK pulses which the Wire library doesn't provide.  There is a TWI (Two Wire Interface) library somewhere that provides more granularity.  Perhaps you will need to read the device datasheet to find out what signals it is expecting.
Pages: 1 ... 372 373 [374] 375 376 ... 542