This library can be used to connect Arduino (or other kind of microcontrollers) to TunerStudio software.
This library manage communication protocol (MegaSquirt). You have to define ECU definition firmware for TunerStudio (doc).
You can:
- Set realtime data
- Set one or more pages (persistent data)
- Change firmware signature (code version)
Tested hardware:
| Hardware | Works??? |
|---|---|
| Arduino Nano | ✅ |
| Arduino Mega | |
| esp32 | |
| stm32 |
Easy example:
#include <TS_lib.h>
#include "structs.h"
// create page object
struct page1 p1;
struct Page page_1 = {&p1, sizeof(p1)};
Page pages[] = {page_1};
// create realtime object
struct realtime_data rt_data;
struct Rt_values rt_values = {&rt_data, sizeof(rt_data)};
// create TS_lib object
TS_lib ts = TS_lib(&Serial, &rt_values, pages, 1);
void setup() {
Serial.begin(115200);
while (Serial.available());
}
void loop() {
ts.update(); // update serial communication
}All examples:
Check out the project wiki for documentation.