6 years, 2 months ago. This question has been closed. Reason: No additional info required.
First mbed project: Big Mouth Billy Bass
I am new to mbed. I am trying to put together Steve Ravet's Big Mouth Billy Bass, but my project seems to be floundering. :-)
I've double and triple checked my wiring and it looks correct (It's pretty simple). I have compiled the code and copied it to the mbed. It seems to load fine since I get the following output from my tty connection:
Hello, world! Waiting for button push Button pushed No disk, or could not put SD card in to SPI idle state Didn't get a response from the disk Set 512-byte block timed out Unable to open command file '/sd/fish.txt'
It is detecting my button push correctly, but accessing the SD card does not appear to be functioning. My SD card is a 4GB SanDisk Micro SD HC that I formatted as a FAT16 using WinXP. I can put the card in my Mac and play the 4 WAV files off it, so I am sure the file system is ok. Is there something else I should check or could do to test my SD functionality? It is wired exactly per the Notebook and I am also using the SparkFun microSD breakout as listed. I have read that some SD cards are better than others, so if I need to pick up a new one, which brand/model/size is recommended? My samples could be crap since they are just WAV's from the internet, but I don't think I am at that point yet, unless the error reported is very generic. The samples are 22KHz.
I am not sure what is supposed to be contained in the "/sd/fish.txt" file (not that I could access it anyway). My code reading skills are not quite there yet. I assume it will be the motor control commands, but I am not sure of the file format. Is this the movement file alluded to in the BMBB Notebook?
I have 4 wav files on the SD. I assume it will process through each one for every button press, so I am not sure how one movement file can accommodate multiple WAVs, but watching the YouTube video demo, he only presses the button once, so is that performance all one huge WAV file?
The WAV and fish.txt used in the demo would be very helpful, but apparently are not in the files section (probably due to copyright nonsense. I would argue this is fair use!).
A little nudge in the right direction would be appreciated.
6 years, 2 months ago.
First of all, in general it is handy to link something if you are using it as basis. Now it was in the related subjects, so found it easily, but for a next time it is handy :).
The problem here is it really cannot access the SD card. Formatting it with for example FAT32 also won't help, since it doesn't arrive at that stage. Some possible ideas:
Quad-check your wiring. Do you have a multimeter? Check if it gets its 3.3V power. You connected the ground pin to mbed ground pin? (Sounds stupid I ask this probably, but it is a quite often made error when there is also for example a battery, that the grounds aren't shorted). CS should also read 3.3V is you measure it. Check the resistance is close to 0 ohm between mbed/SD breakout board.
Try this code: http://mbed.org/cookbook/SD-Card-File-System (with the correct pins for your setup). It is a much newer version of the SDCard library. Since it fails almost directly in your case I doubt it helps, but is worth trying. If it is easy to rewire (for example if you used a breadboard) you can also try reconnecting it using another SPI port. And in general it might then be useful to move your mbed to another position since breadboards sometimes have connection issues.
And of course, simply try another SD card. They are practically free anyway. Maybe you have a spare one yourself. Phones will have micro SD, so you need an adapter for them. But cameras generally will have an SD card.
5 years, 11 months ago.
For anyone having issues with the fish.txt file, please see this forum post: