struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto inValue = getValue<input_VAL>(ctx);
auto vcc = getValue<input_AVCC>(ctx);
auto voltage = inValue * vcc;
if (voltage < 0.01) {voltage = 0.01;};
auto resistance = 5.0 * (vcc - voltage) / voltage;
emitValue<output_OHM>(ctx, resistance);
}