iot

云中树莓派(5):利用 AWS IoT Greengrass 进行 IoT 边缘计算

爱⌒轻易说出口 提交于 2019-11-28 01:32:45
云中树莓派(5):利用 AWS IoT Greengrass 进行 IoT 边缘计算 云中树莓派(1):环境准备 云中树莓派(2):将传感器数据上传到AWS IoT 并利用Kibana进行展示 云中树莓派(3):通过 AWS IoT 控制树莓派上的Led 云中树莓派(4):利用声音传感器控制Led灯 云中树莓派(5):利用 AWS IoT Greengrass 进行 IoT 边缘计算 IoT 的诸多场景中,边缘计算有很多需求。比如,不是每个物联网设备都能连接到互联网,从而连接云上物联网服务。还比如有一些数据安全考虑,不允许将某些数据发到云上。因此,AWS 发布了 Greengrass 服务,用于支持物联网场景中的边缘计算。 1. AWS IoT Greengrass 服务概述 AWS Greengrass 是一种软件,用于将 AWS 云功能扩展到本地设备,使得本地设备可以更靠近信息源来收集和分析数据,同时在本地网络上安全地相互通信。更具体来说,使用 AWS Greengrass 的开发人员可以在云中编写无服务器代码 (AWS Lambda 函数),然后方便地将其部署到设备以在本地执行应用程序。 在 AWS Greengrass 中,设备可在本地网络上安全地通信并互相交换消息而不必连接到云。 安装: Greengrass 是一个软件,可以安装在多种设备上,比如树莓派、AWS EC2

云中树莓派(3):通过 AWS IoT 控制树莓派上的 Led

。_饼干妹妹 提交于 2019-11-28 01:31:07
云中树莓派(3):通过 AWS IoT 控制树莓派上的 Led 云中树莓派(1):环境准备 云中树莓派(2):将传感器数据上传到AWS IoT 并利用Kibana进行展示 云中树莓派(3):通过 AWS IoT 控制树莓派上的Led 云中树莓派(4):利用声音传感器控制Led灯 1. Led 连接与测试 在某宝上买了几样配件,包括T型GPIO扩展板、40P排线、亚克力外壳、400孔面包板、若干杜邦线。现在我的树莓派长得这个样子了: 不由得感谢神奇的某宝,这些东西每一样都不超过三四块钱。 1.1 接线 以下几个简单步骤就完成了接线: 将排线一头插在树莓派的40个pin脚上,将另一头插在扩展板上。要注意方向,多试几次。还要注意在树莓派关机时候再插入。 把扩展板插在面包板上。 把Led 的长脚(正极)插在面包板第6行的任何一个孔内(对应GPIO18),将其短脚(负极或接地)插在第7行的任何一个孔内(对应GND)。 简单说下面包板。刚拿到手时还有点不知所措,稍微研究一下后就简单了。面包板为长方形,长边的两边是为了接电源的,每个长边都是联通的;中间区域内,每行内是联通的。 1.2 简单测试 下面的 python 能让led 灯每两秒钟亮一次: import RPi.GPIO as GPIO import time PIN_NO=18 GPIO.setmode(GPIO.BCM) GPIO

AWS Device Shadow使用

偶尔善良 提交于 2019-11-28 01:01:24
AWS Device shadow 是AWS 官方推荐管理控制IOT设备的方式。 Device:aws iot device sdk(nodejs) client端:aws sdk(nodejs) 关于更多AWS IOT内容可参考: https://docs.aws.amazon.com/zh_cn/iot/latest/developerguide/iot-device-shadows.html 如需要了解device端 C语言操作影子可参考后续文章: 1 Device shadow基本概念 1.1 Device shadow控制模型 1.2 AWS IOT设备影子工作原理 1.3 Device shadow一些关键属性 1.4 DeviceShadow提供了三种API 操作 1.5 Deviceshadow底层实现 2 Sample 2.1 device端代码 2.2MQTT client代码 2.3 测试结果 2.3.1device端打印 2.3.2 client端打印 1 Device shadow基本概念 设备的影子是用于存储和检索设备的当前状态信息的 JSON 文档。(存储在AWS IOT cloud内) Device Shadow 服务可以为您连接到 AWS IoT 的每台设备保留一个影子。您可以使用该影子通过 MQTT 或 HTTP 获取和设置设备的状态

基于STM32L4 IoT探索套件开发AliOS Things

五迷三道 提交于 2019-11-27 17:03:52
前言 ST 与阿里巴巴集团旗下的云计算科技公司——阿里云合作,推出基于STM32L4 IoT探索套件快速开发AliOS Things的方案。STM32用户可以在 STM32L4 IoT上运行阿里的物联网操作系统AliOS,无缝连接阿里云。本文以WiFi连接阿里云收发消息为例介绍如何获得AliOS Things开源代码, 如何基于IoT探索套件STM32 B-L475E-IOT01A与STM32常用开发工具IAR来快速编译、烧写、调试MQTT应用。 硬件概述 从 www.st.com 下载物联网套件B-L475E-IOT01A的详细硬件设计介绍( http://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-discovery-kits/b-l475e-iot01a.html ) 。  这块开发板使用的是ST低功耗MCU系列中的 STM32L475 芯片,拥有1M字节的Flash和128K字节的SRAM。  支持WiFi、蓝牙、SubG,、NFC等多种无线连接方式。 因为它还支持Arduino接口,所以使用者也可以很方便的通过Arduino接口来扩展其他的无线连接模块

RPi python script fails to run from: /etc/rc.local, crontab, systemd

久未见 提交于 2019-11-27 09:54:09
I've tried to make this python script run from /etc/rc.local, crontab @reboot, and systemd via systemctl without any success. The python script runs from the command line while logged in as user pi and exits gracefully into the background without issue. The same goes for running it at the prompt as user pi with: sh /etc/rc.local Any guidance would be appreciated, as follows: #!/usr/bin/python #required libraries import sys import ssl import paho.mqtt.client as mqtt import json from pprint import pprint import Adafruit_CharLCD as LCD from textwrap import fill #Configuration rootCAPath = "/home

How to download android things OS source code?

萝らか妹 提交于 2019-11-27 03:41:37
问题 I could find git repository/branch for Brillio but no separate for Android things. Is it that it is not open source yet or released for public ? 回答1: No because AndroidThings is still in preview as you can see from this link: https://developer.android.com/things/preview/releases.html the source code is not available. There is a GitHub page though with the examples of how things are built on Android Things: https://github.com/androidthings 回答2: cd ~ mkdir IOT cd IOT repo init -u https:/

RFID RC522 Raspberry PI 2 Windows IOT

 ̄綄美尐妖づ 提交于 2019-11-27 01:46:52
I'm looking for a way to use the RFID "RC522" on a Raspberry Pi 2.0 on Windows IOT. It is of course not offical compatible... The offical one (OM5577 demo board) is way to expensive in France (i haven't found any reseller who sold it without a lot of shipping cost (total cost is around 80$)). The RC522 is cheap (<10$). It works great on Arduino and on Raspberry Pi 2.0 on linux. But unfortunatly not yet on Windows IOT. I'm actually using an arduino as a bridge... It isn't an optimal solution; but work well and cost always half the price than the OM5577. I've found this project and try to

Send request over WiFi (without connection) even if Mobile data is ON (with connection) on Android M

橙三吉。 提交于 2019-11-27 01:02:51
问题 I have to send UDP packets to a WiFi module (provided with own AP) with no internet connection but when I connect the mobile with the AP, Android redirects my packets on the mobile data interface because it has got internet connection. I've used the code below to do my job but it seems not working on Android M. @TargetApi(Build.VERSION_CODES.LOLLIPOP) private void setWifiInterfaceAsDefault() { ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context

RPi python script fails to run from: /etc/rc.local, crontab, systemd

£可爱£侵袭症+ 提交于 2019-11-26 14:56:31
问题 I've tried to make this python script run from /etc/rc.local, crontab @reboot, and systemd via systemctl without any success. The python script runs from the command line while logged in as user pi and exits gracefully into the background without issue. The same goes for running it at the prompt as user pi with: sh /etc/rc.local Any guidance would be appreciated, as follows: #!/usr/bin/python #required libraries import sys import ssl import paho.mqtt.client as mqtt import json from pprint

RFID RC522 Raspberry PI 2 Windows IOT

无人久伴 提交于 2019-11-26 09:47:20
问题 I\'m looking for a way to use the RFID \"RC522\" on a Raspberry Pi 2.0 on Windows IOT. It is of course not offical compatible... The offical one (OM5577 demo board) is way to expensive in France (i haven\'t found any reseller who sold it without a lot of shipping cost (total cost is around 80$)). The RC522 is cheap (<10$). It works great on Arduino and on Raspberry Pi 2.0 on linux. But unfortunatly not yet on Windows IOT. I\'m actually using an arduino as a bridge... It isn\'t an optimal