<commit_before>#include <SmartSensors.h>

ASCIISerialStream stream(9600, 3);
GestureRecognitionPipeline pipeline;
TcpOStream oStream("localhost", 5204, 3, "l", "r", " ");

float analogReadToVoltage(float input)
{
    return input / 1024.0 * 5.0;
}

float normalizeADXL335(float input)
{
    return (analogReadToVoltage(input) - 1.66) / 0.333;
}

float normalizeArduino101(float input)
{
    return input / 4096;
}

void setup()
{
    stream.useUSBPort(0);
    //stream.useNormalizer(normalizeADXL335);
    stream.useNormalizer(normalizeArduino101);
    useStream(stream);
    
    pipeline.setClassifier(DTW(true, true, 0.5)); // enable scaling, enable null rejection w/ specified threshold
    pipeline.addPostProcessingModule(ClassLabelTimeoutFilter(500));
    usePipeline(pipeline);
    
    useOStream(oStream);
}<commit_msg>Switch to ADXL335 normalization.<commit_after>#include <SmartSensors.h>

ASCIISerialStream stream(9600, 3);
GestureRecognitionPipeline pipeline;
TcpOStream oStream("localhost", 5204, 3, "l", "r", " ");

float analogReadToVoltage(float input)
{
    return input / 1024.0 * 5.0;
}

float normalizeADXL335(float input)
{
    return (analogReadToVoltage(input) - 1.66) / 0.333;
}

float normalizeArduino101(float input)
{
    return input / 4096;
}

void setup()
{
    stream.useUSBPort(0);
    stream.useNormalizer(normalizeADXL335);
    //stream.useNormalizer(normalizeArduino101);
    useStream(stream);
    
    pipeline.setClassifier(DTW(true, true, 0.5)); // enable scaling, enable null rejection w/ specified threshold
    pipeline.addPostProcessingModule(ClassLabelTimeoutFilter(500));
    usePipeline(pipeline);
    
    useOStream(oStream);
}
{'fraction_non_alphanumeric': 0.12224209898628503, 'fraction_numerical': 0.056648777579010136, 'mean_word_length': 4.6120401337792645, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2490161', 'n_tokens_mistral': 642, 'n_tokens_neox': 562, 'n_words': 109}