#include <Encoder.h> boolean firstTime = true; Encoder myEncoder; void setup() { myEncoder.attach(2, 8); } void loop() { // Set the encoder's postion to 0 if(firsttime == true) { myEncoder.write(0); firstTime = false; } }
encoder.write(value)