Arduino library to control your spectral micro over Arduino board!
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
}
- Update uart commands
- Add CAN support
- Examples
- The software and hardware are still in development and may contain bugs, errors, or incomplete features.
- Users are encouraged to use this software and hardware responsibly and at their own risk.
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!