GithubHelp home page GithubHelp logo

chrisdoykov / arduino-iota-js-bindings-example Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 59 KB

This is a simple implementation of IOTA Rust client JS bindings for the Chrysalis network update. The setup uses an Arduino Nano 33 IoT (although you can use any Arduino board with a Serial connection) with a connected DHT11 sensor and LED, which can send to and receive AES-encrypted data from the IOTA Tangle using Indexation Payloads. This setup does not work on a standalone Arduino and relies on a serial connection to a development machine, capable of running a Node.js environment.

JavaScript 82.99% C++ 17.01%
arduino arduino-serial serial-communication iota-javascript-library iota chrysalis dht11 nodejs example

arduino-iota-js-bindings-example's Introduction

Arduino IOTA Chrysalis Implementation

This is a simple implementation of IOTA Rust client JS bindings for the Chrysalis network update. The setup uses an Arduino Nano 33 IoT (although you can use any Arduino board with a Serial connection) with a connected DHT11 sensor and LED, which can send to and receive AES-encrypted data from the IOTA Tangle using Indexation Payloads. This setup does not work on a standalone Arduino and relies on a serial connection to a development machine, capable of running a Node.js environment.

Requirements

1. Arduino board with a serial connector

2. Development machine with Node.js version: '10.x', '12.x', '14.x', '15.x', '16.x'

3. DHT11 Temperature and humidity sensor

5. (OPTIONAL) An LED

4. A predefined dev.env file with the following variables set:

- NODE: e.g. https://api.lb-1.h.chrysalis-devnet.iota.cafe

- ARDUINO_SERIAL_PORT: e.g. /dev/cu.usbmodem1201

- SENSOR_DATA_MESSAGE_INDEX: ARDUINO TANGLE DATA

- DATA_SECRET: your secret AES encryption key

- IOTA_SEED_SECRET: an IOTA seed generated with the genSeed.js script

Features

  • npm run portscan: Find the serial port on which the Arduino communicates with your machine.
  • npm run send: Execute the sendMessage.js script to listen to the serial port and send data to the Tangle.
  • npm run receive: Execute the receiveMessage.js script to retrieve all messages on to the Tangle for a given index.
  • npm run genSeed: Execute the generateSeed.js script to generate an IOTA seed.
  • npm run genAddresses: Execute the generateAddresses.js script to generate IOTA addresses from a given seed.
  • npm run receiveExample: Execute the getMessagesExample.js script to retrieve random messages from the Tangle.

Installation

First install all npm modules via

npm install

Then load the dht11.ino sketch onto the Arduino and finally - run one of the scripts.

arduino-iota-js-bindings-example's People

Contributors

chrisdoykov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

atoimio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.