Overview of qControl
qCommand are accessible within qControl. Layout configurations can be stored directly in the Quarto's code so that the UI remains consistent regardless of the computer accessing the device.website·Indexed 31 days ago
https://qnimble.comA multi-function data acquisition platform described as a 'Digital Brain for the Analog World'. The platform includes qControl, a web application for interaction, and supports features such as ADC configuration, non-volatile memory (NVM) access, SD card interfacing, and a variant of Protothreads called qProtothreads for parallel function execution.
qCommand are accessible within qControl. Layout configurations can be stored directly in the Quarto's code so that the UI remains consistent regardless of the computer accessing the device.qCommand library. This library allows developers to change variables on the Quarto board using text commands sent over either of its two serial communication ports.loop().void loop() {
Function1();
Function2();
}IntervalTimer class allows a function to be called via an interrupt at a precisely timed interval. The Quarto supports a maximum of 4 active IntervalTimer objects at any given time. These should be instantiated as global objects.IntervalTimer someTimer;SmartData is a data class used for storing and controlling data. It acts as an enhanced version of underlying types and is particularly useful when using qControl, as it automatically updates the qControl view when a value changes programmatically. It supports types such as float, double, int, uint, short, unsigned short, uint8_t, int8_t, and bool.#include "smartData.h"
SmartData<double> someDouble;
SmartData<uint16_t> someUint16 = 5;
SmartData<bool> someBool = false;
// SmartData objects can be used like normal types
someUint16++;
if (someBool) {
someDouble *= 1.2 + 3 * someUint16;
}Use assignVariable in the setup() function to link a global variable to a command string. This allows the variable to be read or modified via serial commands or qControl.
Supported types include pointers to bool, int, uint, float, double, arrays of these types, or SmartData objects.
Parameters:
command: The string identifier for the variable.variable: A pointer to the global variable.read_only (optional): If true, the variable can only be viewed in qControl, not edited. Note: arrays and const variables are read-only by default.#include "qCommand.h"
qCommand qC;
double Jupiter = 1.234;
bool Mars = false;
uint16_t Saturn[4];
void setup() {
qC.assignVariable("Jupiter", &Jupiter); // Read/Write
qC.assignVariable("Mars", &Mars, true); // Read-only in qControl
qC.assignVariable("Sat", &Saturn); // Array (automatically read-only)
}The Quarto introduces a phase shift due to the time required for reading, writing, and filtering analog data. To measure this delay:
phase command to find the value that results in a zero-voltage output (the zero crossing).For example, at 10 kHz, a zero crossing at 72.1° indicates a phase shift of approximately 18° from the expected 90°.
>> filter 10
<< The filter frequency is 10.000000 (and alpha=0.000126)
>> phase 72.1
<< phase is 7.210000e+01
>> output
<< output is -8.996903e-04command arg1 arg2). Use qC.next() to move to the next argument; it returns NULL if no further arguments exist. Use qC.current() to retrieve the value of the current argument as a string. To convert these strings to numbers, use atof() for doubles or atoi() for integers.void multiply(qCommand& qC, Stream& S) {
double a;
int b;
if (qC.next() == NULL) {
S.println("Missing arguments");
return;
}
a = atof(qC.current());
if (qC.next() == NULL) {
S.println("Missing second argument");
return;
}
b = atoi(qC.current());
S.printf("%e times %d is %e\n", a, b, a * b);
}