Show Posts
Pages: 1 ... 329 330 [331] 332 333 ... 542
4951  Using Arduino / Project Guidance / Re: Reset help on: April 14, 2012, 02:43:48 pm
Does the Arduino have power when the shield's power switch is off?
4952  Using Arduino / Programming Questions / Re: ATtiny! Damn that thing is tricky on: April 14, 2012, 06:05:10 am
What if my micro-controller is on a breadboard? Let's say, I bought an AT90S8535 microcontroller chip only, how does this connect to it? Or a better example, an ATtiny?
and does the board give voltage to the microcontroller?

The six lines you need are:
SCK, MOSI, MISO, Ground, +5V, Reset
The first three are the SPI pins.  The next two are power and yes, the USBasp provides 5V.  The Reset is held low during serial programming.

You can find the 10-pin connector layout easily enough and run wires from the cable to your breadboard.  If you eventually make a custom board you should include a 6-pin or 10-pin header.
4953  Using Arduino / Project Guidance / Re: Lipo 3S Voltage Measurement - Incorrect Results on: April 13, 2012, 08:07:20 pm
Have you measured the analog reference voltage at the Vref pin?  If it's not 5.0V your calculations will be off.

If the max cell voltage is 4.2 you don't need a voltage divider for the first cell and the voltage divider for the second cell can be /2 instead of /4.  Those changes would give you more precision at the expense of slightly more complicated math.
4954  Using Arduino / Networking, Protocols, and Devices / Re: Combining RX pins on: April 13, 2012, 07:58:28 pm
Did you remember to provide a common Ground between the two Arduinos?
4955  Using Arduino / Programming Questions / Re: ATtiny! Damn that thing is tricky on: April 13, 2012, 07:53:59 pm
> 1. How does that thing connect to my microcontroller?

Through a 10-pin or 6-pin header.  The ISP comes with a 10-pin cable.  The Arduino has a 6-pin connector, hence the need for an adapter.

> 2. Can I use the arduino environment with that? and just upload sketches normally just using this?

Yes. 

> 3. If so, how? Is there a guide?

Select Tools->Programmer->USBasp.  Then select File->Upload Using Programmer
4956  Using Arduino / Programming Questions / Re: ATtiny! Damn that thing is tricky on: April 13, 2012, 12:09:48 pm
$3.86 including free shipping:

http://www.ebay.com/itm/New-USBASP-USBISP-AVR-Programmer-USB-ATMEGA8-ATMEGA128-/170813851774?pt=LH_DefaultDomain_0&hash=item27c54c887e#ht_2355wt_954

You should probably also get a 10-pin to 6-pin adapter since it comes with a 10-pin cable and the Arduino has a 6-pin header.  That's another $2.48:

http://www.ebay.com/itm/10-Pin-Convert-to-Standard-6-Pin-Adapter-Board-For-ATMEL-AVRISP-USBASP-STK500-/170813886006?pt=LH_DefaultDomain_0&hash=item27c54d0e36#ht_1060wt_954
4957  Using Arduino / Programming Questions / Re: ATtiny! Damn that thing is tricky on: April 13, 2012, 10:31:41 am
Once you invest $10 in an ISP programmer there is no reason not to use 1.0.
4958  Using Arduino / Programming Questions / Re: How to reverse Bipolor motor direction with Joystick on: April 13, 2012, 10:30:12 am
Try this:
Code:

const int Y_CENTER = 516;  // center position of MY joystick shield
const int Y_DEADBAND = 10;  // Minimum offset required for movement

//Assigning Joystick Shield pins
int pinStickY = 1;

//Assigning Easydriver
int pinSTEP = 13;       // Step
int pinDIR  = 12;       // Direction
int pinMS1  = 11;       // MicroStep 1
int pinSLP  = 10;       // Sleep
int pinMS2  =  9;       // MicroStep 2
int pinENA  =  8;       // Enable

void setup()
{
  pinMode(pinSTEP, OUTPUT);
  pinMode(pinDIR, OUTPUT);
  pinMode(pinENA, OUTPUT);
}

void loop()
{
  int offset_Y = analogRead(pinStickY) - Y_CENTER;

  //Set Direction
  digitalWrite(pinDIR, offset_Y < 0);  //  Change to > 0 to swap directions

  offset_Y = abs(offset_Y);

  // If joystick is far enough off center, step the motor
  if (offset_Y > Y_DEADBAND)
  {
    digitalWrite(pinENA, LOW); //Enable
    digitalWrite(pinSTEP, HIGH);
    delayMicroseconds(2);
    digitalWrite(pinSTEP, LOW);
    delayMicroseconds(1000/offset_Y);
  }
  else
  {
    digitalWrite(pinENA,HIGH);  // disable the stepper motor
  }
}
4959  Using Arduino / Microcontrollers / Re: Changing fuse settings in ATtiny24A with ArduinoISP on: April 13, 2012, 10:08:18 am
The serial buffer in Arduino 1.0 is too small to work with the ArduinoISP sketch.  To work around it you can reduce the baud rate in the sketch and in programmers.txt.
4960  Using Arduino / Sensors / Re: LED with Pressure Sensor not reading properly on: April 13, 2012, 10:03:52 am
If you are using the prescribed 10K pull-down resistor you will not get a 0 reading unless the FSR resistance gets VERY high, into the millions of Ohms.

What are the upper and lower limits of FSR resistance?  Perhaps a different pull-down resistor would get you a better range but I would not expect to reach both 0 and 1023.
4961  Using Arduino / Project Guidance / Re: Serial to USB with standalone Atmega on: April 13, 2012, 09:57:32 am
How would your "Serial to USB Converter Board" work differently from a $3 USB to Serial cable?

http://www.ebay.com/sch/i.html?_nkw=usb+uart+ttl&_sacat=0&_odkw=usb+to+serial+converter&_stpos=01754&LH_BIN=1&_sop=15&gbr=1&_fcid=1&_osacat=0&_clu=2
4962  Using Arduino / Programming Questions / Re: ATtiny! Damn that thing is tricky on: April 13, 2012, 09:50:25 am
When I tried arduino as ISP, it said something with a sync problem, I will copy the exact words later today.

In Arduino 1.0 they made the serial buffer so small you get a serial overflow when trying to use the ArduinoISP sketch.  You can go back to 0.22 or use a slower baud rate in the sketch and in the programmers.txt file.
4963  Using Arduino / Installation & Troubleshooting / Re: uploading sketches using an ISP on: April 13, 2012, 09:39:40 am
To get the Arduino UNO R3 back to normal:

Add your programmer to a programmers.txt file as I suggested before.

Hook your programmer to the Arduino UNO.

Select "Arduino UNO" from Tools->Boards

Select your programmer from Tools->Programmers

Select Tools->Burn Bootloader.
4964  Using Arduino / Installation & Troubleshooting / Re: arduino uno red led,s on: April 13, 2012, 09:14:05 am
hi i just bought an arduino uno and i am new to this. the yellow led on my board keeps on blinking, can tell anyone tell me how to stop it

Upload this sketch:
Code:
void setup() {}
void loop() {}
4965  Using Arduino / Programming Questions / Re: How to reverse Bipolor motor direction with Joystick on: April 12, 2012, 11:06:38 pm
Code:
centerYValue = abs(centerYValue);//If negative, turns nonnegative

That is where you threw away the information about whether the joystick was pushed forward or back.  Perhaps you should take note of the sign of the value BEFORE you destroy it.
Pages: 1 ... 329 330 [331] 332 333 ... 542