Examples - Electronic Bricks - Electronic Brick Multi Rotary

Multi Rotary - Get input with the Electronik Brick Multi Rotary.

That program gives you a basic understanding how to use the Multi Rotary Electronic Brick.



/*
Multi Rotation Example
Example: How to use the 'Multi Rotation Electronic Brick'
Usage: Connect Brick to analog pin 1 on the Seeduino Shield
*/

int sensorInputPin = 1;                  // Define the analog input pin for sensor
int multiRotationValue = 0;              // Storage variable

void setup()
{
        Serial.begin(9600);                    // Invoke Serial Interface for debugging purposes
}

void loop()
{
        multiRotationValue = analogRead(sensorInputPin);          // Read the sensor
        Serial.println(multiRotationValue);                         // Output to console or computer
}


This website has been archived and is no longer maintained.