Skip to content

Commit

Permalink
modified README
Browse files Browse the repository at this point in the history
  • Loading branch information
wellflat committed Sep 18, 2016
1 parent bdd0504 commit 8baf083
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -2,12 +2,12 @@
IoT sample codes

## IoT cloud service test
- AWS IoT
- AT&T M2X
- ...
- AWS IoT (AWS IoT Device SDK)
- AT&T M2X (HTTP/MQTT client)
- etc.

## Python sensor module libraries test
- Adafruit
- M2X MQTT Client
- ...
## Camera module test
- [The Raspberry Pi camera module v2](https://www.raspberrypi.org/products/camera-module-v2/)

## sensor module libraries test
- [Adafruit Industries libraries](https://github.com/adafruit)
8 changes: 4 additions & 4 deletions aws/publish.js
@@ -1,10 +1,10 @@

var awsIot = require('aws-iot-device-sdk');
var client = require('aws-iot-device-sdk');
var fs = require('fs');

var conf = JSON.parse(fs.readFileSync('cert.json', 'utf8'));

var device = awsIot.device({
var device = client.device({
region: conf.region,
clientId: conf.clientId,
privateKey: conf.privateKey,
Expand All @@ -13,8 +13,8 @@ var device = awsIot.device({
});

device.on('connect', function() {
console.log('connect');
console.log('connected.');
device.publish(conf.topic, 'test message');
console.log('published');
console.log('published message.');
return;
});

0 comments on commit 8baf083

Please sign in to comment.