This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* NAND Gate Fault Detector with Pin Identification | |
* Custom DSP block for Edge Impulse | |
*/ | |
module.exports = function(data, params) { | |
return new Promise(function(resolve, reject) { | |
try { | |
// Parse input data into numerical array format | |
let rows = []; | |
if (typeof data === 'string') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <NANDFaultDetection_inferencing.h> | |
// Buffer to hold input features | |
float features[EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE]; | |
void classifyIC(uint8_t* ic_measurements) { | |
// Prepare features from IC measurements | |
for (int i = 0; i < EI_CLASSIFIER_DSP_INPUT_FRAME_SIZE; i++) { | |
features[i] = (float)ic_measurements[i]; | |
} |