Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 2.41 KB

File metadata and controls

68 lines (48 loc) · 2.41 KB

SpectralMicroArduino

Arduino library to control your spectral micro over Arduino board!

License: MIT Issues release

Example code

Example: Teensy 4.1 with Spectral Micro

This example demonstrates how to communicate with the Spectral Micro using Serial1 on a Teensy 4.1. USB Serial is used for debugging.

// Tested on Teensy 4.1 with Spectral Micro
// Use serial1 for communication with the Spectral Micro and usb serial for debugging
// Teensy 4.1 has Serial1 on pins 0 and 1, which are the RX and TX pins respectively
#include <SpectralMicro.h>

SerialCommandLibrary mySerial(Serial1);

void setup() {
    Serial.begin(256000);
    mySerial.begin(256000);
    delay(1000); // Give some time for the serial connection to establish

    // Example commands
    mySerial.KV(0.123);
    mySerial.L(1.234);
    mySerial.R(2.345);
    mySerial.Cal();
}

void loop() {
    mySerial.Cal();
    Serial.println("testing");
    mySerial.loop(); // Continuously check for incoming data
    delay(1000); // Give some time for the serial connection to establish
}

TODO

  • Update uart commands
  • Add CAN support
  • Examples

More about our projects

Liability

  1. The software and hardware are still in development and may contain bugs, errors, or incomplete features.
  2. Users are encouraged to use this software and hardware responsibly and at their own risk.

Support the project

The majority of this project is open source and freely available to everyone. Your assistance, whether through donations or advice, is highly valued. Thank you!

General badge General badge

Project is under MIT Licence