Read File from microSD and Send to server via Eletric Imp

Hello, I have a project that I’m trying to send a file saved to a MicroSD to a server. It is possible to use Electric Imp to do this?

If yes, how can I read a file saved on the microSD and send via Electric Imp?

thank you

You’d have to write your own filesystem code to do this, but it is possible. Not aware of anyone who has done it though.

Humm. There is no easy way to send an image file using the eletricimp?

Oh, you can send data using the electric imp no problem. The issue is reading a microSD card, which is likely to be FAT formatted.

Hugo, you have some example how can I do this read and send a data using the eletric imp?

I don’t have any example code to talk to an SD card or read FAT, no.

To send data to an agent, you just use agent.send(); have a look at the lala example code if you want to see big binary blobs being thrown around :slight_smile:

Hi, Hugo look my code.

I dont know what’s wrong, I cant send this HEX Pic from my server…

local hexPic = “FFD8FFFE002446007B0C000000000000000000000000000000E0018002100032120…” //Picture in Hex…

local output = OutputPort(“Photo”,“image”);
output.set(hexPic);

function capture(){
imp.wakeup(30.0, capture);
//server.show(output);
server.log(output);
}

//server.show(output);

// Register with the server
imp.configure(“A Madre Instatrap”, [], [output]);
capture();

// End of code.
server.log(“Instatrap running”);
server.log("Agent: free memory: "+imp.getmemoryfree());

How big is “hexPic”?

You also ought to be using agents - email info@electricimp for details.

Here’s a link to code that drives an imp-attached JPEG camera, which sends JPEGs from imp to agent to HTTP:

https://github.com/electricimp/examples/tree/master/vc0706

Hugo, thanks for your help! Now, I need access to the agent, right?

Yep, if you want to use agents :slight_smile:

Hugo, Where are you from?

From? I’m one of the founders of electric imp, originally from the UK but now in the bay area.

Nice! Congratulations! I’m realy like your product. Can you able Agents for me? :slight_smile:

*enable

I saw you emailed info@, someone will deal with this (likely tomorrow).

Yes, I did it yesterday so that u told me. I’ll wait tomorrow. Thanks. :slight_smile: