Show Posts
|
|
Pages: [1] 2 3 ... 16
|
|
3
|
Using Arduino / Project Guidance / Sketch too big!!! First time this has happened to me.
|
on: April 07, 2013, 01:50:36 pm
|
This little block of code: // if(recording && newReading) // { // if(strcmp(messageID, "GPGGA") == 0) // { // char filename[13]; // sprintf(filename, "%s.txt", date); // if(!SD.exists(filename)) Serial.println("Making Directory"); // File dataFile = SD.open(filename, FILE_WRITE); // // // if the file is available, write to it: // if (dataFile) // { // dataFile.print(latitude); // dataFile.print(","); // dataFile.print(longitude); // dataFile.print(","); // dataFile.println(satsUsed); // dataFile.close(); // } // } // } takes my sketch from 27,444 bytes (just under the 28,672 byte limit for the leonardo) to over 33,000 bytes. Is there a seriously trimmed down version of the SD library or perhaps the adafruit OLED display library that anyone knows about?
|
|
|
|
|
6
|
Using Arduino / Project Guidance / Re: SD card library - Why does pin 10 have to be configured as an output?
|
on: April 07, 2013, 01:06:12 pm
|
The documentation states that the library won't function properly if pin 10 isn't configured as an output, even if you aren't using it as the chipselect. I haven't been able to find any explanation as to why it won't function correctly or if it is just specific features that won't function correctly. Can someone explain what it is that won't work if you don't configure pin 10 as an output? I've commented that line out in some of the example sketches and it seems to still work fine. I am using a Leonardo with the sd card wired up to the spi pins and I'm using pin A4 as the chipselect.
It has to do with the internal SPI hardware inside the AVR chip, using that pin to configure itself to be in master or slave mode depending on the pin mode of that pin, output mode = master mode, input mode = slave mode. The AVR datasheet is the source of such gory details. If you were using a totally software drive SPI function then that would not be an issue, but you would not be able to obtain the high performance possible with the hardware SPI unit. Lefty Perfect explanation! Thank you. The shield that I made uses pin 10 for another function but I guess lucky for me that functionality uses the pin as an output also. I guess I would have had problems if the other functionality used that pin as an input.
|
|
|
|
|
7
|
Using Arduino / Project Guidance / SD card library - Why does pin 10 have to be configured as an output?
|
on: April 07, 2013, 12:30:28 pm
|
|
The documentation states that the library won't function properly if pin 10 isn't configured as an output, even if you aren't using it as the chipselect. I haven't been able to find any explanation as to why it won't function correctly or if it is just specific features that won't function correctly. Can someone explain what it is that won't work if you don't configure pin 10 as an output? I've commented that line out in some of the example sketches and it seems to still work fine. I am using a Leonardo with the sd card wired up to the spi pins and I'm using pin A4 as the chipselect.
|
|
|
|
|
8
|
Using Arduino / Programming Questions / Arduino IDE and writing libraries
|
on: March 30, 2013, 07:33:32 am
|
|
I have read through various tutorials on writing Arduino libraries, and they are great for teaching the syntax and structure of a library, but they never get into the real basics of things such as how to let the Arduino IDE know that you are writing a library so that it will save a file with a .h or .cpp extension instead of the .ino extension. Is it just up to the user to rename the saved file with a .h or .cpp extension?
|
|
|
|
|
10
|
Using Arduino / Project Guidance / Burn Bootloader -> Arduino as iso
|
on: February 23, 2013, 04:35:39 pm
|
|
I keep reading that under the tools menu there is a burn bootloader option that has a sub menu under it that gives you the option "burn boot loader arduino as isp". Mine doesn't have that. It is just "burn boot loader" with no sub-menu. Where can I find the burn bootloader arduino as isp command?
|
|
|
|
|
12
|
Using Arduino / Project Guidance / Re: Brown out reset loop due to thin traces?
|
on: February 17, 2013, 08:00:07 pm
|
To do that, do I just change this line in board.txt: atmega328bb.bootloader.extended_fuses=0x05 to atmega328bb.bootloader.extended_fuses=0x06 and then burn the bootloader again? Yes that should do it. If you have a ISP programmer you shouldn't have to burn the whole bootloader. eg. avrdude -c usbtiny -p m328p -U efuse:w:0x06:m
I just have the arduinoISP and the "burn bootloader" button on the arduino ide.
|
|
|
|
|
13
|
Using Arduino / Project Guidance / Re: Brown out reset loop due to thin traces?
|
on: February 17, 2013, 07:37:11 pm
|
8 mil traces, buck-boost converter. OOF! Is this on the same pcb? I don't know which part you're using, but see the picture, same idea for buck-boost,
Well the traces dealing with the converter and charging circuit are all polygons. So for instance, this is what the bottom layer looks like around the buck/boost converter (TPS63001DRCT) and the top layer is a solid ground plane with lots of vias stitching the two sides together. The thick traces leading out from there are a revision that will go in the next board. In the board that I am working on right now, they are thin traces but the polygons directly around that little SON10 package are all there. converter by jg1996business, on Flickr
|
|
|
|
|
15
|
Using Arduino / Project Guidance / Re: Brown out reset loop due to thin traces?
|
on: February 17, 2013, 07:05:41 pm
|
I would measure the voltage and see. Also your sketch, which we can't see, might have bugs.
Unfortunately I don't have a scope so I can't see what the voltage is at the moment that it resets. I am sure the sketch is buggy, but it does run when the battery is fully charged. It makes it hard to debug when I can't figure out if the reset condition is due to bugs in the sketch or if it is a hardware design problem.
|
|
|
|
|