8 years ago.

Mbed Newbie !!

Hi All, I am getting hands on with Mbed Environment by going through the Tutorials. Currently I am working on a Project. I want to acquire the Sensor Data to the Mbed Board and do some Calculations and display the same on the PC using a GUI developed in Android Studio, To display the Acquired data - from Mbed to PC Should I use Ethernet ? And to Display the Output Data , if i go with USB HID ? At The Same Time ?? Is that Possible ? Is this A Good Option ?

Need Some Inputs !!

Thanks, SBW

1 Answer

8 years ago.

Low tech is normally best if it does what you need. Can you use serial or is that too slow?

I have no idea about "At The Same Time ?? Is that Possible ?" since it's not clear what two things you are talking about doing at the same time.

Hi, Thanks Andy, I have to create a Log / Data Logger everytime i run my program. ALso define an Interface to read the Data from the Log File to display on the Gui. Log Data must contain Input Sensor Data, Calculated Data. Now Is it possible to use Mbed device as a USBHID to send data to Pc? and Also to store the huge amounts of Sensor Data as a File on the PC ? Are there any Example codes where i Can do some homework to understand and reuse it for my project ? Thanks , sbw.

posted by Sahana Waikar 03 Nov 2016

USB HID is designed for mouse or keyboard input, it's not suited for bulk transfer of binary data. It's certainly not suited for getting data back from the PC.

USB serial port profile does allow data to go in both directions and should give you a couple of Mb/s worth of data. Or you could use a TCP connection over ethernet.

Does that data really need to go to the PC for storage or would storing it on an SD card work?

Can you define "huge amounts of sensor data", how much data are we talking about. 1kb/s, 1Mb/s, 1Gb/s?

In terms of your general question, yes you can read sensors, receive data, send data and drive a display all at the same time. It all comes down to exactly how much data and how fast you need it to run. And how efficiently you can write your program e.g. floating point maths is about 200 times slower than integer maths, performing calculations the wrong way can make or break a speed critical program.

posted by Andy A 03 Nov 2016