Running the IOTA C libs on Arduino

From novice to slightly less novice

Lewis Daly
May 29, 2018 · 5 min read

Prerequisites

Setting Up

$ cd ~/developer/arduino/sketches/libraries/
$ mkdir iota_client
$ cd iota_client
$ mkdir -p ./src/external
$ touch ./src/IotaClient.c ./src/IotaClient.cpp library.properties

Writing the Library

IotaClient::IotaClient(String host, String port)
{
_host = host;
_port = port;
}
unsigned char address[81];
char seedChars[] = "DONTEVERUSETHISSEED999";
unsigned char seedBytes[48];
chars_to_bytes(seedChars, seedBytes, 81);
get_public_addr(seedBytes, 0, 2, address);
char charAddress[81];
bytes_to_chars(address, charAddress, 48);
Serial.print("charAddress is: ");
Serial.println((char *)charAddress);

Dependencies

$ cd src/external
$ git clone https://github.com/vessels-tech/iota-c-light-wallet.git

The Sketch

Disclaimer

Acknowledgements

vessels

Digital Innovation in the Developing World

Lewis Daly

Written by

CTO of vesselstech.com | Digital Tech for Development

vessels

vessels

Digital Innovation in the Developing World