Skip to content

Mauxilium/ArduinoSerialRpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ArduinoSerialRpc

ArduinoSerialRpc is the Arduino side part of a serial communication library with Arduino Card.

There are some other projects used to interact with this one:

The communication model is implemented in form of:

  • Remote Method Invocation. Where Arduino calls a method declared into a Java class.
  • Remote Procedure Call. Where a Java process call a function defined into the Arduino sketch.

The communication is a point to point model, performed through the serial (USB) port.

Architecture

tbdf

Features

  • Bidirectional communication
  • Low Arduino resources required
  • Easy to learn interface
  • Flexible naming convention

Getting Started

Arduino Side Installation

It is required to:

Other Languages Installation

Please refer to other repositories:

Using it in Arduino Sketch

#include <ArduinoSerialRpc.h>

// Creating the rpc agent you are totally free to assign
// your preferred name to the card
ArduinoSerialRpc rpc("MyTestCard");

void setup() {
  Serial.begin(9600); // or any other supported value

  // Other languages can use "callIt" string to force the execution of myMethod function
  rpc.registerArduinoFunction("callIt", myMethod);
}

void myMethod() {
    // This method is called when the remote program
    // executes an executeRemoteMethod("callIt"); 
}

void loop() {
    // Here Arduino calls a method of the remote program program.
    // No registration is required
    rpc.executeRemoteMethod("pingFromArduino");
}

Next steps

About

Arduino side part of a serial communication library with Arduino Card

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages