advice before purchase

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
theredbaron
 
Posts: 26
Joined: Mon Jan 20, 2014 9:04 pm

advice before purchase

Post by theredbaron »

Hello,

I have a project in mind but I'd like to ask if the question is appropriate before I describe it further. I am looking for advice of what components to purchase before I place my order. The project is Arduino based. Is this question appropriate to this forum?

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: advice before purchase

Post by adafruit_support_bill »

Yes. This is the place to ask! :)

theredbaron
 
Posts: 26
Joined: Mon Jan 20, 2014 9:04 pm

Re: advice before purchase

Post by theredbaron »

thank you for the reply. The purpose of this project is to play a sound through a speaker when a person approaches within a specified distance. I need an Arduino board (I was thinking Mega or UNO), the music shield and either an ultrasonic or IR sensor. Am I missing any other components? Which sensor is better suited for a distance between 7 to 10 feet?

Is there an existing project I can use as a starting point for wiring and code?

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: advice before purchase

Post by adafruit_support_bill »

This is a good project to get you started in the right direction: http://learn.adafruit.com/halloween-pumpkin
It uses a Maxbotix ultrasonic sensor, an Arduino Uno and a wave shield. You should be able to use most of the code as well.

theredbaron
 
Posts: 26
Joined: Mon Jan 20, 2014 9:04 pm

Re: advice before purchase

Post by theredbaron »

Hi, the URL below, containing a link to the sketch (DAP example sketch), appears to be broken

http://learn.adafruit.com/halloween-pumpkin/step-1

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: advice before purchase

Post by adafruit_support_bill »

I fixed the links. Try it now.

theredbaron
 
Posts: 26
Joined: Mon Jan 20, 2014 9:04 pm

Re: advice before purchase

Post by theredbaron »

Hello,

I verified I can upload code to the board, I formatted the SD card with the SD formatting utility, loaded the Halloween sound files on it, loaded all the header files from the WaveHC library on the card as well. When I try to upload the daphc sketch (daphc.pde) I crash at the line:

SdReader card; // This object holds the information for the card

I'm assuming the header files are not being read. If so, where should I place them?

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: advice before purchase

Post by adafruit_support_bill »

When I try to upload the daphc sketch (daphc.pde) I crash at the line:

SdReader card; // This object holds the information for the card
Post the exact text of the error message you are getting.

theredbaron
 
Posts: 26
Joined: Mon Jan 20, 2014 9:04 pm

Re: advice before purchase

Post by theredbaron »

this is the entire error log dump:

Code: Select all

daphc:7: error: 'SdReader' does not name a type
daphc:8: error: 'FatVolume' does not name a type
daphc:9: error: 'FatReader' does not name a type
daphc:10: error: 'WaveHC' does not name a type
daphc:13: error: 'dir_t' does not name a type
daphc:22: error: variable or field 'play' declared void
daphc:22: error: 'FatReader' was not declared in this scope
daphc:22: error: 'dir' was not declared in this scope
daphc.pde: In function 'void setup()':
daphc:28: error: 'putstring_nl' was not declared in this scope
daphc:30: error: 'putstring' was not declared in this scope
daphc:31: error: 'FreeRam' was not declared in this scope
daphc:34: error: 'card' was not declared in this scope
daphc:39: error: 'card' was not declared in this scope
daphc:44: error: 'vol' was not declared in this scope
daphc:55: error: 'vol' was not declared in this scope
daphc:58: error: 'root' was not declared in this scope
daphc:66: error: 'root' was not declared in this scope
daphc:66: error: 'LS_R' was not declared in this scope
daphc:66: error: 'LS_FLAG_FRAGMENTED' was not declared in this scope
daphc.pde: In function 'void loop()':
daphc:71: error: 'root' was not declared in this scope
daphc:72: error: 'play' was not declared in this scope
daphc.pde: In function 'void error_P(const char*)':
daphc:80: error: 'PgmPrint' was not declared in this scope
daphc:81: error: 'SerialPrint_P' was not declared in this scope
daphc.pde: In function 'void sdErrorCheck()':
daphc:89: error: 'card' was not declared in this scope
daphc:90: error: 'PgmPrint' was not declared in this scope
daphc:91: error: 'card' was not declared in this scope
daphc.pde: At global scope:
daphc:99: error: variable or field 'play' declared void
daphc:99: error: 'FatReader' was not declared in this scope
daphc:99: error: 'dir' was not declared in this scope

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: advice before purchase

Post by adafruit_support_bill »

...does not name a type
These errors mean that the compiler was not able to find the library in the expected location. But the SD library should be part of your Arduino IDE installation. What version of the IDE are you using?

theredbaron
 
Posts: 26
Joined: Mon Jan 20, 2014 9:04 pm

Re: advice before purchase

Post by theredbaron »

I am running 1.0.5 under Mac OSX

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: advice before purchase

Post by adafruit_support_bill »

If you click on file->examples->SD->cardinfo, can you compile that?

theredbaron
 
Posts: 26
Joined: Mon Jan 20, 2014 9:04 pm

Re: advice before purchase

Post by theredbaron »

I assume you mean the SDReadtest?

here's the log dump?

Code: Select all

SdReadTest:7: error: 'SdReader' does not name a type
SdReadTest.pde: In function 'uint8_t cidDmp()':
SdReadTest:10: error: 'cid_t' was not declared in this scope
SdReadTest:10: error: expected `;' before 'cid'
SdReadTest:11: error: 'card' was not declared in this scope
SdReadTest:11: error: 'cid' was not declared in this scope
SdReadTest:12: error: 'putstring' was not declared in this scope
SdReadTest:16: error: 'putstring' was not declared in this scope
SdReadTest:17: error: 'cid' was not declared in this scope
SdReadTest.pde: In function 'uint8_t partDmp()':
SdReadTest:41: error: 'part_t' was not declared in this scope
SdReadTest:41: error: expected `;' before 'pt'
SdReadTest:42: error: 'putstring_nl' was not declared in this scope
SdReadTest:44: error: 'card' was not declared in this scope
SdReadTest:44: error: 'PART_OFFSET' was not declared in this scope
SdReadTest:44: error: 'pt' was not declared in this scope
SdReadTest:45: error: 'putstring' was not declared in this scope
SdReadTest:51: error: 'pt' was not declared in this scope
SdReadTest.pde: In function 'void sdError()':
SdReadTest:63: error: 'putstring_nl' was not declared in this scope
SdReadTest:64: error: 'putstring' was not declared in this scope
SdReadTest:65: error: 'card' was not declared in this scope
SdReadTest.pde: In function 'void loop()':
SdReadTest:76: error: 'putstring_nl' was not declared in this scope
SdReadTest:79: error: 'card' was not declared in this scope
SdReadTest:86: error: 'putstring' was not declared in this scope
SdReadTest:90: error: 'SD_CARD_TYPE_SD1' was not declared in this scope
SdReadTest:93: error: 'SD_CARD_TYPE_SD2' was not declared in this scope
SdReadTest:96: error: 'SD_CARD_TYPE_SDHC' was not declared in this scope

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: advice before purchase

Post by adafruit_support_mike »

Those errors mean the Arduino IDE can't find the libraries. They need to be in your sketchbook/libraries folder.

This tutorial over in the Learning System has more information on the subject: http://learn.adafruit.com/adafruit-all- ... -libraries

theredbaron
 
Posts: 26
Joined: Mon Jan 20, 2014 9:04 pm

Re: advice before purchase

Post by theredbaron »

that took care of the problem :)

on to the next thing...

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”