an Arduino (ESP32) library to use web3 on Ethereum platform.
Switch branches/tags
Clone or download
Pull request Compare This branch is 8 commits ahead of kopanitsa:master.
Latest commit 341e178 Apr 16, 2018

README.md

web3-arduino

img

  • What is this library?

    • This is an Arduino (or ESP32) library to use web3 on Ethereum platform.
  • What is Arduino?

  • What is ESP32?

  • What is web3?

  • What is Ethereum?

    • Ethereum is a decentralized platform for applications that run exactly as programmed without any chance of fraud, censorship or third-party interference.
    • https://www.ethereum.org/

Environment

Installation

  1. download the zip file from Clone or download button on Github.
  2. launch Arduino IDE.
  3. Install board settings ESP32-Arduino
  4. Sketch -> Include Library -> Add .ZIP file -> select downloaded zip file.
  5. Then you can use this from Arduino IDE.

Example

Please refer examples directory to learn more about how to use the libraries

Setup

#define INFURA_HOST "rinkeby.infura.io"
#define INFURA_PATH "/<YOUR_INFURA_ID>"

Web3 web3(INFURA_HOST, INFURA_PATH);

Generate a private key

python -c 'import os; print ", ".join([ str(ord(c)) for c in bytes(os.urandom(32)) ])'

Copy this to terminal and paste the output as your private key in the ino file.

To convert this to a private key you can use in MyEtherWallet you do: print ''.join('{:02x}'.format(x) for x in array_alpha)

Dependencies