Read sensor data via Python Script
응답
16. 5. 31 오전 11:29

Hi Guys,

I'm starting with the XDK, real newbie have patience please... Do you know where I can get a reference project for logging the data from temperature and humidity sensor using a Python script? I made several searches and found nothing. Any help is welcomed...

0 (0 투표)
RE: Read sensor data via Python Script
응답
16. 5. 31 오전 11:45 as a reply to Eduardo Pereira.

Hi Eduardo,

welcome to the XDK community.

The XDK is based on the EFM32GG390 micro controller. Applications need to be written in the low level programming language C to guarantee a long running time and short execution times.
So unfortunately there is no python support.

There is an example project to log various sensor values that you can find here.

Please let me know, if you have further questions.

Kind regards
Manuel

0 (0 투표)
RE: Read sensor data via Python Script
응답
16. 5. 31 오전 11:57 as a reply to Manuel Cerny.

Hi Manuel,

 

Thanks for the fast answer. I didn't mean to write my XDK application withPython. Maybe I was not clear on my question, sorry.

I need to stablish a serial connection with the XDK and read the values, via Python script. Do you happen to know a project that performs that (serial connection and logging of data) on the XDK side?

Regards,

Eduardo

 

0 (0 투표)
RE: Read sensor data via Python Script
응답
16. 5. 31 오후 12:31 as a reply to Eduardo Pereira.

Hello Eduardo,

now its clear to me what you want to do.
I suppose you have a python script that reads a serial port and parse the values.
In the XDK-Workbench there is an example called StreamSensorDataOverUsb which explains what you are looking for.

It measures values on the XDK and logs them to the serial port.

Does this help you?

Kind regards
Manuel

+1 (1 투표)
RE: Read sensor data via Python Script
응답
16. 6. 3 오전 5:33 as a reply to Manuel Cerny.

Manuel,

It works like a charm. I modified the data stream for having only the environmental sensor data and cleaned up the the text being streamed. Looks good.

many thanks for the support!

Rgds,

Ed

 

0 (0 투표)
RE: Read sensor data via Python Script
응답
16. 6. 3 오전 8:17 as a reply to Eduardo Pereira.

Hello Eduardo,

great to hear that you got it working!
Just don’t hesitate to ask if you have any other questions.

- Manuel

0 (0 투표)