Show Posts
Pages: [1] 2 3 ... 82
1  Using Arduino / Installation & Troubleshooting / Re: Linux Occasionally Won't Program on: January 19, 2014, 08:58:50 am
That's an interesting idea. I had been noticing that the serial port kept changing -- by now I'm up to /dev/ttyUSB7 (started at USB0).
Also, I checked the kernel log. This shows up often:
root hub lost power or was reset
Maybe that's the problem. The computer itself is 6-7 years old...

2  Using Arduino / Installation & Troubleshooting / Linux Occasionally Won't Program on: January 18, 2014, 10:01:27 pm
I have a new Linux install (Lubuntu) on an old Macbook. Under Linux, my Duemilanove sometimes won't work.

I am usually able to upload fine. But every once in a while, though, it won't upload... I'll get the "stk500_recv(): programmer is not responding" error. But not always! Once it happens, it may take 10-20min to work again. It seems sort of random (how long it takes to work again).

There is no specific program that this happens with -- it happens even with the Blink program, and even if nothing is plugged in at all. I have checked for shorts, etc. and can't seem to find any. I am not doing anything with pins 0/1.

One of of my first thoughts was that the bootloader was corrupted. So I reburned the bootloader. Still didn't work.
Then I tried replacing the ATmega (with a newly burned bootloader). Same problem persisted.
Yet I think the bootloader is fine because the pin 13 LED always blinks upon reset.

Then I thought it was probably the FTDI chip. But when I program on my iMac (w/ OSX), everything seems fine. I never get the error on my mac: only under Linux!

This wouldn't surprise me if it happened every time. But it happens intermittently. That wouldn't make sense if it was a driver / FTDI chip problem (after all, the board is 4+ years old).

While it is broken, the TX/RX LEDs don't blink as much as they should. A couple flashes of the TX light right after reset, and then nothing. This would seem to implicate the FTDI chip. Yet I never have problems with serial communication (i.e. Serial.prinln())... only upload causes problems.

I have not been able to figure out any other information (i.e. what triggers the problem, what causes it to work again).

So my questions are:
1. Is this a Linux thing? Or was I just lucky enough to not see it while using my iMac?
2. Could this be a problem with the FTDI chip?
3. And should I just get a new arduino? Keep in mind this is a duemilanove... 4-5 years old.
4. Could this be a USB port bad connection? I never see the power light flicker, but maybe the data lines have bad connections (on either the Arduino on computer end)? I have tried changing USB cables.


3  Using Arduino / Programming Questions / Re: OBD2 and Arduino Help on: September 09, 2012, 07:50:17 pm
You declared the class as
COBD odb;

Change it to
COBD obd;

4  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Shield stopping at "begin" on: September 09, 2012, 07:47:12 pm
The odd thing is that you *only* see "Attempting..."

This code:

if ( Ethernet.begin( mac ) == 0 ){
    delay( 5000 );
    Serial.println( "Ethernet failed to begin." );
    delay( 5000 );
    Serial.println( "Success!" );

Should either print "Ethernet failed to begin." or "Success!", no matter what.

Maybe the code is hanging within the Ethernet.begin()...

5  Using Arduino / Programming Questions / Re: How to start with ICP1 external counter clock source on: August 29, 2012, 06:46:58 pm
ICP1 is not the clock input. It is the input capture for the timer.

If you want to use an external clock, you need to feed the signal into XTAL1. Refer to page 34 of the datasheet (

To tell the ┬Áprocessor to use the external clock, you need to program the CKSEL fuses to 0000. This is done with avrdude.

6  Using Arduino / Installation & Troubleshooting / Re: Reset failure during power dips on: August 29, 2012, 06:40:25 pm
How long is the dip? Also, how much power is everything drawing? If the datalogger doesn't draw much power, and you have relatively quick dips, a cap should be fine.

7  Using Arduino / Programming Questions / Re: SRAM and storing strings on: April 08, 2012, 01:47:53 pm
Why must strings be stored in sram? You can put variables in the flash with PROGMEM... F() is sort of doing the same thing.
8  Using Arduino / Programming Questions / Re: SRAM and storing strings on: April 08, 2012, 01:43:26 pm
Without the F() syntax, "hello" would be stored in your SRAM. But you don't have a lot of SRAM, so using the F() stores the string in the flash (program) memory, of which you have a lot. Projects that need a lot of strings will benefit from storing strings in flash, as it will free up ram for things like variables. But a flash string cannot be modified.

9  Using Arduino / Programming Questions / Re: Blank sketch takes up 466 bytes??? on: February 22, 2012, 11:11:52 am
OK. I'll try it w/out Arduino and see what the size of my program is... Thanks for the help!

10  Using Arduino / Programming Questions / Re: Blank sketch takes up 466 bytes??? on: February 22, 2012, 10:58:38 am
So even if I don't use a certain function, it may still be compiled? In that case I may compile some of my code myself with avr-gcc and just include avr/io.h...

11  Using Arduino / Programming Questions / Blank sketch takes up 466 bytes??? on: February 22, 2012, 10:45:28 am
Anyone have any ideas why this is happening?

12  Using Arduino / Storage / Re: Wire and 24LC256 Issue on: February 02, 2012, 07:22:43 pm
So I (tried) to incorporate in a page write, and now it won't erase. Odd thing is that the writeArray function is copied from another program, where it works.

/* Science Research Timer Erase
 * Erases both the internal and
 * external 24LC256 EEPROMs.

#include <Wire.h>
#include <EEPROM.h>

#define EEPROM_ADDRESS        0x50
#define EXTERNAL_EEPROM_SIZE  32768L //size of 24LC

#define L_PIN  3

void setup() {
  unsigned long memPointer = 0;

  pinMode(L_PIN, OUTPUT);

  /* First clear the internal. */
  for (int i = 0; i <= E2END; i++) {
    EEPROM.write(i, 0);


  /* And now the external EEPROM. */
  char eraseArray[BUFFER_LENGTH]; //32 bytes for standard Wire library
  for(int i = 0; i < BUFFER_LENGTH; i++) {
    eraseArray[i] = 0xFF;
  //Now eraseArray[] is filled with 0xFF.
  while(memPointer < EXTERNAL_EEPROM_SIZE) {
    writeArray(eraseArray, BUFFER_LENGTH, memPointer);
    memPointer += BUFFER_LENGTH; //increase the address.
   digitalWrite(L_PIN, HIGH);
} //end setup

void loop() {

void blink(byte pin) {
  digitalWrite(pin, HIGH);
  digitalWrite(pin, LOW);

/* writes an Array to the 24LC56.*/
void writeArray(char data[], int length, unsigned int address) {

  if((length + 2) > BUFFER_LENGTH) { //too big for Wire buffer!

  unsigned int i;


  /* Now do a page write */

  for(i = 0; i < length; i++) {

  Wire.endTransmission(); //send the data.


13  Using Arduino / Storage / Re: Wire and 24LC256 Issue on: February 02, 2012, 06:33:50 pm
But I could change that 32 to something else, and get a larger buffer? Or is this hardcoded?

14  Using Arduino / Storage / Re: Wire and 24LC256 Issue on: February 01, 2012, 10:19:30 pm
You could increase the buffer size, bearing in mind there are 5 of them. So already you are using 5 x 32 bytes.

So there are 5 buffers, each 32 bytes. I am using all 5 of them (160 bytes) yet only have a 32 byte buffer...? Which one's which?

Thanks for clarifying about endTransmission().

15  Using Arduino / Storage / Re: Wire and 24LC256 Issue on: February 01, 2012, 09:45:03 pm
Thanks... so is there anyway of sending a full 64 byte page? And why does Wire only send the data @ endTransmission?

Pages: [1] 2 3 ... 82