使用azure功能连接python shell并发送无线调制解调器信息 [英] Connect python shell with azure function and send wireless modem information

查看:100
本文介绍了使用azure功能连接python shell并发送无线调制解调器信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在使用笔记本电脑作为网关接收器,该接收器从与Arduino串行连接的原始数据接收 使用调制解调器的示例代码帮助无线调制解调器.

Hi, I am using my laptop as a gateway receiver which receives raw data from Arduino connected serially with Wireless Modem with help of using a sample code of python.

我了解了可以转换无线调制解调器原始数据的天蓝色功能.我需要一些建议,需要在其中使用python将串行数据发送到Azure函数.  建议

I have learned about the azure function which can convert the raw data of wireless modem. I want some advice in which I need to send the serial data to Azure function using python. suggestions on this will be much use here.

现在,我可以使用示例代码来测试串行数据:

import serial
ard = serial.Serial('COM4', 9600);
while True:
  k = ard.readline().decode('ascii');
  print(k) 

推荐答案

Python的Azure函数目前处于预览状态,但您的用例仍然可以使用.

Azure Functions for Python is currently in preview but your use case should still work.

您可以创建一个简单的HTTP触发函数(遵循文档),然后将原始数据发送到该函数进行转换.

You can create a simple HTTP triggered function (follow this doc) and then send the raw data to the function to convert.

话虽如此,取决于您要实现的目标将有助于提供更好的解决方案.
例如,如果您只想转储所有这些原始数据进行处理,最好将这些数据推送到Blob存储( 附加blob ),并让函数在数据到达时直接从那里转换数据.

That being said, depending on what exactly you are trying to achieve would help to give a better solution.
For instance, if you want to just dump all this raw data for processing, it would be better to push this data to blob storage (into an append blob) and have functions convert this data directly from there when it arrives.

此外,如果支持您的硬件,则 天蓝色的物联网 d要看. :)

Also, if your hardware is supported, Azure IOT would be something you'd want to look at. :)


这篇关于使用azure功能连接python shell并发送无线调制解调器信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆