// galvanic.nqc #define GALV SENSOR_1 #define DURATION 500 #define DELAY 300 task main() { int new, old; SetSensorType(GALV, SENSOR_TYPE_NONE); old = GALV; while(true) { new = GALV; if (new > old) PlayTone(55, DURATION); // lower stress else if (new < old) PlayTone(220, DURATION); // higher stress else PlayTone(110, DURATION); // same stress old = new; Wait(DELAY); } }