how to see if Yún is using SD card?

Hey everyone,

glad with my Yun board and installed a 4Gb SD card on it and made a folder arduino and data on it, in the arduino folder I created a www folder. The SDCard volume name is SD. If I look at the config screens on the arduino through the web interface I see the card is mounted on /mnt/sda1 and when doing a DF command through the SSH shell I can also see it's there. But if I upload a sketch to the board through wifi, doesn't that sketch resides at the SD card somewhere? If I take a look on the card nothing much changes there... How can I be sure the memory available for sketches is extended by the sd card? how do I know the Yun is using it like it should be??? There are things I can not find immediately in the docs, maybe a good idea of exactly telling what to do with the sd card (how to name it, now its filesystem is FAT32,... how to create the ideal SD CARD?) And am I correct to state that the card is an extension for the sketches memory or not? please lot's of info on the SD card and how to handle it would be greatly welcome. Also are there any commands or conditions I have to do to effectively use the SD card?

thanks a lot for the support. Philippe

I love the Yun, but I guess I still have to learn a lot.

Hi

PB7781: Hey everyone,

glad with my Yun board and installed a 4Gb SD card on it and made a folder arduino and data on it, in the arduino folder I created a www folder. The SDCard volume name is SD. If I look at the config screens on the arduino through the web interface I see the card is mounted on /mnt/sda1 and when doing a DF command through the SSH shell I can also see it's there.

Well done!

But if I upload a sketch to the board through wifi, doesn't that sketch resides at the SD card somewhere? If I take a look on the card nothing much changes there...

The SD card is not used to store the sketch, but to store additional files (like a web frontend to your sketch, as in the TemperatureWebPanel example)

How can I be sure the memory available for sketches is extended by the sd card? how do I know the Yun is using it like it should be???

The SD card is not used to expand the RAM available to your sketch, nor to upload sketches greater than what can fit into the 32u4. It's just like a hard drive (and you can actually use an external hard drive instead of an SD card) so it's disk space, not RAM

There are things I can not find immediately in the docs, maybe a good idea of exactly telling what to do with the sd card (how to name it, now its filesystem is FAT32,... how to create the ideal SD CARD?)

There are no requirements: you plug whatever sd card in and the yun makes it available at /mnt/sdaX (the X may vary). If you want to make the IDE upload additional web files or if you want the SD card available at the known path /mnt/sd, then it needs the "arduino" folder and its "www" subfolder. The Yun works with almost every filesystem (fat32, ext4, ntfs, hfs...) and there is no need to name it in a particular way.

And am I correct to state that the card is an extension for the sketches memory or not?

No, the SD card is used as an additional disk space, not to increase RAM available to sketches.

I love the Yun, but I guess I still have to learn a lot.

In some way, the yun is a leonardo on steroids. We hope to have kept things simple enough like with a leonardo. Take your time get all its steroids

thanks for this quick and clear reply!

The reason for me to believe that the SD card is an extended form of memory is this passage in the Yun beginners guide:

External storage on the Yún [u]You're discouraged from using the Yún's built-in non-volatile memory[/u], because [u]it has a limited number of writes[/u]. [u]You can use external memory like a microSD card[/u] or thumb drive for saving data, or [u]your own scripts[/u], web pages, etc. For the Yún to access and store information on these drives through the 32U4, they need to have a directory named arduino in the root of the volume.

I guess that with scripts they don't mean sketches.

PB7781: I guess that with scripts they don't mean sketches.

Indeed: we are referring to javascript, python, ruby, php and whatever the yun can run

I did all of the above and still ain't working :(

  • Formatted my 2Gb microSD with FAT32 and standardvalues for clustersize
  • Volumenamed it SD
  • made folders arduino and data on the root directory
  • made a subfolder www in the arduino folder
  • trough online advanced configuration I found the mounting point /mnt/sda1
  • set mounting point to /mnt/sda , didn't change the filesystem
  • loaded the sketch, open the serial monitor at 300Baud or 9600Baud

but if I browse to 192.168.1.11/sd I can see my hmtl file I stored in root/arduino/www

...And still nothing happend. I'm quite desperate :/

yannisdc I'm a bit confused: you say that going to 192.168.1.11/sd you see the files you stored on the SD card? What's not working? What error message do you get?

On a side note: there is no need to set mount points, indeed I fear that may cause troubles if you are not an expert, so you'd better restore the previous configuration. Yun ALWAYS makes your sd card automatically available, both if you have created the arduino/www folder structure or not. In former case, you'll see it available at /mnt/sd, in the latter you'll see it only at /mnt/sda1.

I can see the files without error but if I run the datalogger example my serial port stays empty and doesn't react. Can it be that this problem is also caused by httpclient setup?

You mean the serial monitor? Which port have you selected from the port menu? Datalogger requires the serial (COM or /dev/tty...) port selected