with this data i logged it on a sd card. my problem is when i want to go "offline"
mrDickson:
seems no problem with the wiring, like i said it work when its conecthed to the computer. think the problem is with my code..
Probably quite the opposite. While your first post is barely coherent, you have said the code works but apparently Arduino will not work when disconnected from the computer. There is nothing to suggest you have changed the code, so there is a lot to suggest there is nothing wrong with it. There is also a lot to suggest the only thing that HAS changed is the power supply, so that is likely to be the problem. Posting the wiring details is probably a good idea but, as a guess, either your 5v supply is inadequate, or incorrectly connected.
Having said that, and despite your saying it is OK, I have glanced at your code, and would be suss about
sd_file.flush(); //saving the file
I think it is nonsense.