Skip to content

a plugin for OctoPrint to communicate over usb with an controller board like Arduino.

Notifications You must be signed in to change notification settings

APEbbers/SerialCommunicator

Repository files navigation

SerialCommunicator

This plugin let you send gcodes, action commands and events to an arduino. (or any other device). The arduino then can do something, for example change the color of a LED strip. The plugin is developed with an usb serial connection in mind between a Raspberry PI and an arduino.

Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/APEbbers/SerialCommunicator/archive/master.zip

Configuration

After installing you will find the plugin under settings.

image

Tab "Connection"

image

Here can you:

  • Select the USB port to which the arduino is connected. The USB port is identified with the VID and PID numbers of the connected device. The plugin will uses these numbers to automaticly connect to the same device next time you start OctoPrint. Even when you plug your device to a different USB port.
  • Select the baudrate. (The arduino must be programmed with the same baudrate!)

Tab "GCODE commands"

image

Enter an string of gcode commands, separated with ";" (For example: M500;M503;M81). When OctoPrint recieves one of these commands, the plugin will send these to the arduino.

Tab "Action commands"

image

Here you can filter any of message belonging to one of the standard action commands. And action command looks like this: "// action:command some message" For each command in the table you can enter an string of words separated with ";". (For example 0%;Finished;Error). When OctoPrint recieves a command and its message contains one of these words, the plugin sends the command to the arduino. (Only the command, without "// action:"). When you enter a string of words for the command "any", any action command with a message containing one of these words, triggers the plugin to send "any" to the arduino.

Tab "Events"

image

Here you can check any of the standard events within OctoPrint. When checked and that events is triggered, the plugin will send the event name to Arduino. So when the event "connected" has occured, the plugin sends "connected" to arduino. Custom events are not inplemented (yet).

Tab "Examples"

image

Under the tab "Examples" you will find an table with links to program examples for arduino. It will show how to catch the messages send by this plugin and do something with it.

About

a plugin for OctoPrint to communicate over usb with an controller board like Arduino.

Resources

Stars

Watchers

Forks

Packages

No packages published