Show Posts
Pages: [1]
1  Using Arduino / Storage / How to work SD Library's "CardInfo" Program? on: November 24, 2012, 07:08:57 pm
Hello!
  I'm trying to learn how to use a seeedstudio SD Card Shield V2.1


I have a Diecimilia ATmega168.

I've tried uploading the included "CardInfo" program to my Arduino many times, but nothing ever shows up on the Serial Monitor.

The program should be able to notify you if the card reader is not hooked up properly, so I tried removing the SD card shield altogether hoping it would at least tell me an error... but even then nothing came through on the Serial Monitor.

I know the Arduino works; I just uploaded and tested the "ASCIITable" program and it works just fine.

I'm at that newbie-desperation phase where I've been trying to figure this out for hours, and just feeling increasingly out of my depth.  Any information will be greatly appreciated!!!
2  Forum 2005-2010 (read only) / Troubleshooting / Re: String .length function not letting sketch compile on: January 02, 2010, 01:01:40 pm
Awesome!!! Thank you very very much Mem! Got it working now!  smiley-grin
3  Forum 2005-2010 (read only) / Troubleshooting / String .length function not letting sketch compile on: January 01, 2010, 07:20:54 pm
Hi Everyone!

I'm hoping this is some simple mistake on my part, I've been bashing my head against Strings for most of the afternoon and can't seem to make any progress.  smiley

Here's a distilled version of my problem:

Code:
#include <WString.h>

char str1[] = "123456789A";

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

void loop()
{
  int i = str1.length();
}

Whenever I go to compile this I get:
In function 'void loop()':
error: request for member 'length' in 'str1', which is of non-class type 'char [11]'


Searching the forums here, I found 2 changes that needed to be made to the WString library.
See the following pages:
...arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1241618944/11
...arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1261015776
(Sorry, I can't post links yet.) but even for those errors the sketch at least compiled.

Here's my system: Macintosh G5 PowerPC, OS 10.4.11 running Arduino 0017.

All I really want to is to be able to find the length of a String (aka. char array) and then see if 2 strings are equivalent (which also won't work for me).  I suppose I can use For loops for everything, but I guess I'm kind of stubborn sometimes.  smiley-razz

Any ideas/suggestions/comments/criticisms/witty remarks are welcome!!!!! smiley-grin
4  Forum 2005-2010 (read only) / Troubleshooting / Re: avrdude: stk500_getsync(): not in sync: resp=0x00 on: August 02, 2009, 04:48:07 pm
I got that same error code you did.  What worked for me was pressing the reset button on the arduino just before I clicked to upload my code onto it.

If that doesn't work, try doing a forum search for parts of that error message.  I believe I've seen other threads that talk about that too.

Hope this helps!
Cheers!  smiley
5  Forum 2005-2010 (read only) / Troubleshooting / Re: Audio processing on: August 02, 2009, 04:41:24 pm
Thank you!  That third black wire has been driving me crazy.  smiley

As for the transfomer specs, I haven't been able to find any.  It is intended for audio, frequency response: 300Hz to 10kHz, and "low-level impedance matching."  It came from Radio Shack:
http://www.radioshack.com/product/index.jsp?productId=2103254

It's listed as model "EI-19" there but I can't find any data sheets on it.  This is the closest one I could find:
http://www.mouser.com/Search/ProductDetail.aspx?qs=LQJGOuQCHKRvrvV6RVubRA%3d%3d
but I'm not sure it's the same thing.  That one has 6 leads while mine has 5.  Although all the dimensions match except the length, but it's off by just under .1 inches.

Does this help?
Thank You!!!
6  Forum 2005-2010 (read only) / Troubleshooting / Re: Audio processing on: August 02, 2009, 12:14:37 am
Hello!  smiley  I have 2 questions at the end of this.
I was also trying to make a sort of UV meter with my Arduino, but I was trying to do it using an audio amplifier from Radio Shack.  I don't have an Electrical Engineering degree, so if this is an extremely silly idea please go ahead & tell me!

I cut an old stereo headphone cord, untwisted the 3 wires inside and soldered short copper wires to each of them.  Then attached the right channel to the Red Transformer Wire and the stereo grounding wire to the White Transformer Wire (the left channel is just kinda' left hanging smiley-razz )

Then I plugged the Blue Transformer Wire into the +5V on my Arduino Diecimila, and the Green Transformer Wire into my Analog In 0 on my Diecimila.



Here's the code I used based on the Analog Input Tutorial:

Code:
int sensorPin = 0;    // select the input pin for the potentiometer
 int ledPin = 13;      // select the pin for the LED
 int sensorValue = 0;  // variable to store the value coming from the sensor

 void setup() {
   // declare the ledPin as an OUTPUT:
   pinMode(ledPin, OUTPUT);
   Serial.begin(9600);  
 }

 void loop() {
   // read the value from the sensor:
   sensorValue = analogRead(sensorPin);                    
   Serial.println(sensorValue);
 }

My Results:  When no music was playing the sensorValue stayed pretty consistently at 1023.

When I plug the headphone cord into my iPod and start playing music, the sensorValue number starts dancing all over the place.  I've seen it go all the way down to 1.

2 Questions:
1) Am I actually measuring the signal strength coming from my iPod headphone jack?

2) What on earth is the Black Wire on the Transformer for?
 :-[
7  Forum 2005-2010 (read only) / Workshops / Re: A question on where to begin. on: August 02, 2009, 12:13:51 am
Not that I'm that advanced, but the book that helped me really get started in Arduino programming was Making Things Talk by Tom Igoe.

If you're completely new to the world of programming though, I might suggest...

***goes and looks through bookshelves***

Drat, I was going to recommend my Computer Science 1 textbook but I think that was one of the books that got lost our recent move. (We shipped some of our books in a box and when it arrived at our new place it was full of someone else's books.  Not that I'm complaining mind you... now I can finally read Plato's Republic! )

Anywho, I would suggest a good introductory Java book if you really want to focus on Arduinos.  That's because Arduino programming is Java programming.  The Arduino / Processing language is based on the Java computer language.  The C language is a bit different because it's not quite "object oriented" like Java is... but, bottom line I recommend studying Java first.  (It's also a little more forgiving in terms of errors.)

Hope this helps!
Cheers! smiley
Pages: [1]