#include <OzIDManager.h> #include <OzRotaryController.h> OzIDManager* manager; OzRotaryController* rotaryController; const EncoderType encoderType = EncoderType::HALF; const int buttonPin = 4; const int channelAPin = 2; const int channelBPin = 3; void setup() { Serial.begin(115200); manager = new OzIDManager; manager->_sendACK = true; manager->_checksum = true; OzCommunication::setIDManager(manager); rotaryController = new OzRotaryController(encoderType, buttonPin, channelAPin, channelBPin); int x=1; manager->sendLinkSetup(); manager->PrintWelcomeLine(rotaryController, x++, "MyRotaryEncoder"); } void loop() { rotaryController->ownLoop(); OzCommunication::communicate(); }
More information
- How to setup a rotary encoder on arduino mega
- How to setup a rotary encoder on arduino nano
- How to setup a rotary encoder on arduino uno
- How to setup a rotary encoder on Raspberry Pi
- Rotary encoder protocol for arduino
- How to control a rotary encoder using chat messages
- Rotary Encoder Desc
- Rotary Encoder Arduino