Skip to content

janelia-arduino/ModularServer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModularServer

Library Information

Name
ModularServer
Version
7.3.5
License
BSD
URL
https://github.com/janelia-arduino/ModularServer
Author
Peter Polidoro
Email
peter@polidoro.io

Description

Modular device server library.

This firmware requires at least Teensy 3.x level resources. Known to work with Teensy 3.2, Teensy 3.5, Teensy 3.6, Teensy 4.0, and Teensy 4.1.

Webpage Documentation

https://janelia-arduino.github.io/ModularServer/

API NAMES

{
  "id": "getAPI",
  "result": {
    "firmware": [
      {
        "name": "ModularServer",
        "version": "7.3.5"
      }
    ],
    "verbosity": "NAMES",
    "functions": [
      "getDeviceId",
      "getDeviceInfo",
      "getApi",
      "getPropertyDefaultValues",
      "setPropertiesToDefaults",
      "getPropertyValues",
      "getPinInfo",
      "setPinMode",
      "getPinValue",
      "setPinValue"
    ],
    "parameters": [
      "firmware",
      "verbosity",
      "pin_name",
      "pin_mode",
      "pin_value"
    ],
    "properties": [
      "serialNumber"
    ]
  }
}

Host Computer Setup

Download this repository

https://github.com/janelia-arduino/ModularServer.git

git clone https://github.com/janelia-arduino/ModularServer.git

PlatformIO

Install PlatformIO Core

https://docs.platformio.org/en/latest/core/installation/index.html

python3 -m venv .venv
source .venv/bin/activate
pip install pip --upgrade
pip install platformio
pio --version

99-platformio-udev.rules

Linux users have to install udev rules for PlatformIO supported boards/devices.

Download udev rules file to /etc/udev/rules.d

curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core/develop/platformio/assets/system/99-platformio-udev.rules | sudo tee /etc/udev/rules.d/99-platformio-udev.rules

Restart udev management tool

sudo service udev restart

Add user to groups

sudo usermod -a -G dialout $USER && sudo usermod -a -G plugdev $USER

Remove modemmanager

sudo apt-get purge --auto-remove modemmanager

After setting up rules and groups

You will need to log out and log back in again (or reboot) for the user group changes to take effect.

After this file is installed, physically unplug and reconnect your board.

Compile the firmware

Gnu/Linux

make firmware

Other

pio run -e teensy31

Upload the firmware

Gnu/Linux

make upload

Other

pio run -e teensy31 -t upload

Serial Terminal Monitor

Gnu/Linux

make monitor

Other

pio device monitor --echo --eol=LF

get API in terminal monitor

getAPI NAMES ["ModularServer"]

Arduino Ide

Download

https://www.arduino.cc/en/software

Additional Boards Manager URLs

File > Preferences

https://www.pjrc.com/teensy/package_teensy_index.json
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

Add Board Support Packages

  • Teensy by Paul Stroffregen
  • Raspberry Pi Pico/RP2040 by Earle F Philhower, III

About

Modular device server library for Arduino-like devices.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.7%
  • Makefile 0.3%