Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: SEEED SD Card Shield and the ardunio mega 2560 on: December 26, 2012, 03:58:27 pm
I myself am also trying to get seeed sd card shield and the mega 2560 to work together.  I am fairly new to all of this and was wondering if anyone has a messenger account or facebook and would be able to help me out by answering some questions on how to get all of this stuff to work together.  I have the Arduino Mega 2560 and am trying to get it to work with the seeed sd shield and also the seeed 2.8"tft touch shield.  please send me a message if you are able to help me with this...

At this point I think they are right either we rewire the sdshield or get a different ardunio. I don't think there is a fix. They have a newer version of the SD card shield that works with the 2560 mega but that's the 4.0 not the 3.0 that we have. How you can tell which is which I don't know. I'm not happy about SEEED at all at this point.

edit: I forgot to add this link
2  Using Arduino / Programming Questions / Re: SEEED SD Card Shield and the ardunio mega 2560 on: December 22, 2012, 08:22:45 pm
In this link you posted, it states specifically (under Features) this card is not Mega compatible.
You can probably "pin bend" a bit to get it to work, but it won't work "off the shelf".

If you look at the code of the scripts I'm talking about however it specifically mentions that you can change a pin to make it mega compatible. So I don't know which to trust. I have seen people have gotten this work so I assume you can. I seriously doubt this a hardware issue particularly. This seems to suggests that SD cards can work with it but need to use different pins. It could be that I need to actually rework the SD cards board for this yes but there is that option so with the script provided I think. Some people figured it out so there has to be a way that doesn't involve me taking the board apart to do this.

Now I realize the SD card related stuff was made universally so it could be the arrangement of this particular board is just not useable. Is there any reason that pins 51 52 and 53 have to be used on a mega that anyone can explain? Is this the only spot on the board that can do this? Is there something special about those spots? This seems like a software issue when you look at it that way. I'll look into an uno or one of the other ones mentioned but I have no real idea which ones will work if this is a hardware issue since the box of the SEEED Shield claims its "ardunio compatible" leading me to believe that any non compatible ardunios they would have excluded. In the very least I can say that the support from the SEEED forums has been non existent and much of the wiki seems to be down or incomplete inaccurate or outdated (I got a touch screen from them and it had similar misleading or inaccurate information on the site). I don't think I'll be buying more products from them. Though the touch screen they sold seems to be working fine despite requiring the same ports as the SD shield. I don't seriously see a reason that this has the be hardware I know I could take the thing apart and make it work that way but I don't see a reason why that's needed considering all I've said.
3  Using Arduino / Programming Questions / Re: SEEED SD Card Shield and the ardunio mega 2560 on: December 21, 2012, 02:20:29 pm
Some of the example code won't compile from the get go giving random errors leading me to believe it doesn't have some library it needs the cardinfo script seems to run but even with a sandisk 2GB SD card in (the recommended on the SEEED wiki) it still reports the error.
If you are using the Arduino IDE to compile the code, there is nothing random about the error messages.

Incomprehensible, perhaps, but not random.

Others, for example the QuickStart script, give a whole host of errors
Where did this code come from, so we can try to understand/reproduce the issues?

The code is available for download in the link I provided. I had a small break through last night. I tried removing the libraries from my computer completely then reinstalling. Can't tell you why that worked but it did now I'm getting a different error. This was from sdInfo it asks in the serial monitor "press any key to continue" it loads for a second after pressing a key and then gives

"card.init failed SD errorCode: 0X1 SD errorData: 0X0"

As a serial monitor error message I've found a few people that have had the same problem but if they ever figured out how to fix it they didn't share what the answer was. If I figure it out I'll let you all know.
4  Using Arduino / Programming Questions / SEEED SD Card Shield and the ardunio mega 2560 on: December 20, 2012, 03:54:48 pm
I'm trying to get the SEEED SD Card Shield to work with my ardunio mega 2560 and I'm not having any luck. Some of the example code won't compile from the get go giving random errors leading me to believe it doesn't have some library it needs the cardinfo script seems to run but even with a sandisk 2GB SD card in (the recommended on the SEEED wiki) it still reports the error.

Initializing SD card...initialization failed. Things to check:
* is a card is inserted?
* Is your wiring correct?
* did you change the chipSelect pin to match your shield or module?
Others, for example the QuickStart script, give a whole host of errors

"QuickStart:135: error: redefinition of 'const uint8_t spiSpeed'
QuickStart:5: error: 'const uint8_t spiSpeed' previously defined here
QuickStart:139: error: redefinition of 'Sd2Card card'
QuickStart:9: error: 'Sd2Card card' previously declared here
QuickStart:140: error: redefinition of 'SdVolume volume'
QuickStart:10: error: 'SdVolume volume' previously declared here
QuickStart:141: error: redefinition of 'SdFile root'
QuickStart:11: error: 'SdFile root' previously declared here
QuickStart:144: error: redefinition of 'ArduinoOutStream cout'
QuickStart:14: error: 'ArduinoOutStream cout' previously declared here
QuickStart:147: error: redefinition of 'char cinBuf [40]'
QuickStart:17: error: 'char cinBuf [40]' previously declared here
QuickStart:148: error: redefinition of 'ArduinoInStream cin'
QuickStart:18: error: 'ArduinoInStream cin' previously declared here
QuickStart:151: error: redefinition of 'int chipSelect'
QuickStart:21: error: 'int chipSelect' previously declared here
QuickStart.cpp: In function 'void cardOrSpeed()':
QuickStart:153: error: redefinition of 'void cardOrSpeed()'
QuickStart:23: error: 'void cardOrSpeed()' previously defined here
QuickStart.cpp: In function 'void reformatMsg()':
QuickStart:163: error: redefinition of 'void reformatMsg()'
QuickStart:33: error: 'void reformatMsg()' previously defined here
QuickStart.cpp: In function 'void setup()':
QuickStart:169: error: redefinition of 'void setup()'
QuickStart:39: error: 'void setup()' previously defined here
QuickStart.cpp: At global scope:
QuickStart:179: error: redefinition of 'bool firstTry'
QuickStart:52: error: 'bool firstTry' previously defined here
QuickStart.cpp: In function 'void loop()':
QuickStart:180: error: redefinition of 'void loop()'
QuickStart:53: error: 'void loop()' previously defined here

Note that I didn't edit the script any from the basic so I'm not sure what the problem is. I've already gone through all the things i can find on this subject including this wiki page but I feel like I'm missing something really basic. The scripts I'd like to focus on are cardinfo and QuickStart since they are really basic and if we figure out whats wrong there it should fix the problems of the more complex programs. The downloads are on the page ( I'm going to keep messing around with it but if I figure something out I'll let you know.

edit: Had some 4am grammar issues in the post sorry about that.
5  Using Arduino / General Electronics / Digital pins and grounds on: November 06, 2012, 01:10:27 am
Let me start by saying I have an ardunio mega 2560. I'm really confused about why I only have what appears to be 6 grounds but 43 digital ports and 15 analog. Why do I have so many ports but only 6 grounds? Can I use digital pins as grounds without blowing my arudino up? I feel like I'm missing something really basic but I don't know what.
6  Using Arduino / Programming Questions / My gardunio edit and my issues with the delay function on: November 01, 2012, 03:19:20 pm
I decided I'd remake the gardunio because I saw some issues in how it was set up but liked the concept. But I'm having some issues working the timing of the watering and lighting. I know the problem is the delay function but I'm not sure how to work an alternative.  Rather than just rewriting my code if you can please explain how to fix it instead. Examples are great.

int photocellPin = 0; // the cell and pull down are connected to a0 to check for light levels
int WaterSensor = 1; // Water level sensor
int photocellReading; // the analog reading from the analog resistor divider
int lightarray1 = 13; // lights for the plants
int waterpump = 7; // Its the pump for the water
int water_val; // stores the value for water levels
void setup(void) {
// send debugging information via the Serial monitor
  pinMode(lightarray1, OUTPUT);
  pinMode(waterpump, OUTPUT);
  digitalWrite (waterpump, LOW);
void loop(void) {
Serial.print("Water levels at ");
Serial.println( water_val );
//turn water on when soil appears to be dry stop when the plant is watered
if (water_val < 850)
  digitalWrite(waterpump, HIGH);
while (water_val < 850)

digitalWrite(waterpump, LOW);
//reads the light levels
photocellReading = analogRead(photocellPin);
Serial.print("Analog reading = ");
Serial.print(photocellReading); // the raw analog reading
// We'll have a few threshholds, qualitatively determined
if (photocellReading < 30) {
digitalWrite(lightarray1, HIGH);
else {
digitalWrite(lightarray1, LOW);
7  Using Arduino / Programming Questions / Millis, LED and the story of a guy that has no idea what he is doing. on: October 23, 2012, 12:38:27 am
I'm trying to expand on the code blink without delay code ( ). I would like to try to make it so two different lights blink independently from each other but this just seems to make one light up no matter what I do. Mainly I wanted to do this so I could understand the function for more complex projects. The delay feature seems to be clock for the whole loop and millis seems to be for an individual if statement.  I think I just don't fundamentally understand what "millis" is suppose to do. I was looking for something to provide two different loops and this is the solution that an ancient forum post gave but it doesn't seem to be working. It worked for them so I must be doing something wrong.


What is millis?
What would a program with two LEDs set to different timings via millis look like?

Thank you all
8  Using Arduino / Microcontrollers / Re: Programming Xicors or 12f629 on: October 20, 2012, 10:15:15 pm
I have no idea how to program these at all...Any help would be appreciated.

Reading the datasheets of those devices would be quite helpful.

I read over them but it seems to assume you want to code in binary to get these things to work which there is no way I'm gonna do that. I know the ATtiny has a way of programming with the Ardunio but you need the ISP or whatever its called for it. The ATtiny and ATmega ISP don't seem to work on these. Here's the schematics for these things hopefully this makes more sense to you than it does to me.  The pic 12F6629 seem like there is less going on than the Xicors so they might be easier to work with.

It would also help to mention what they are (we aren't mind readers) and what you are hoping to do with them.

Once I get my edited version of the Gardunio well coded I'd like to use these rather than the Ardunio to control it. For now if we can get them to maybe do something simple like the blink example sketch that would work for me. I just wanna see what these are capable of.
9  Using Arduino / Microcontrollers / Programming Xicors or 12f629 on: October 20, 2012, 01:02:46 am
I have a two Xicor x28c64P-20 (v9119 and T9129) and ten 12F629. I have no idea how to program these at all but I figure the Arduino can help. Anyone have any idea? I really don't want to do this by hand. I just started with this Ardunio and don't know much about programming or anything about binary. Any help would be appreciated.
Pages: [1]