How to use a Rotary Pot Plug with Arduino

This is a article shows how to interface a rotary pot plug with Arduino.

Rotary Pot Plug is a analog input device, basically a potentiometer assembled as a plug.

 

Example Code:

 

void setup() 
{
  Serial.begin(9600);
}

void loop() 
{
 int sensorValue = analogRead(A0);
 Serial.println(sensorValue);
 delay(1);        
}

 

To get the above code to work, connect the Rotary Pot Plug with Arduino using the 43A cable to the port containing A0 in the corner. Ensure the black wire connects to ground.

Set the baud-rate of the serial monitor to 9600 & the values will start appearing as the pot is tuned. The variable ‘sensorValue’ contains the value of the pot as a 10bit number.

How to use a RFID Reader Plug with Arduino

This is a article shows how to interface a RFID Reader plug with Arduino.

RFID Reader Plug is a serial input device, this reads 125kHz RFID cards & sends the data to the controller connected to it.

 

Example Code:

 

int count = 0;                                         
char input[12];                                         // character array of size 12 
boolean flag = 0;                                       // flag =0
void setup()
{
   Serial.begin(9600);                                  // begin serial port with baud rate 9600bps
}
void loop()
{
   if(Serial.available())
   {
      count = 0;
      while(Serial.available() && count < 12)          // Read 12 characters and store them in input array
      {
         input[count] = Serial.read();
         count++;
         delay(5);
      }
      Serial.print(input);                             // Print RFID tag number 
       
   }
}

To get the above code to work connect the the RFID Reader plug with Arduino board’s serial port using 44A cable, use the above pictures as reference. Array ‘input’ in the above code contains the data read from the RFID card.

How to use a Four Button Plug with Arduino

This is a article shows how to interface a four button plug with Arduino.

Four Button Plug is a analog input device, each button press gives a unique voltage value, this translates to a unique 10bit value when read with a Arduino.

IMG_3322 IMG_3333

 

 

 

 

 

 

Example Code:

 

void setup() 
{
  Serial.begin(9600);
}

void loop() 
{
 int sensorValue = analogRead(A0);
 Serial.println(sensorValue);
 delay(1);        
}

 

 

For the above code to work, connect the 4 Button Plug with Arduino using the 43A cable to the port containing A0 in the corner. Ensure the black wire connects to ground.

Set the baud-rate of the serial monitor to 9600 & the values will start appearing as you press the button.

 

 

How to use the analog keypad breakout with Arduino

The analog keypad breakout, is designed using a network of resistors of particular values. Using this board will reduce the number of pins required for interfacing a keypad with a microcontroller or a processor as it gives a unique analog values for each button press which should just be read using an Analog in pin. Both 3×4 & 4×4 keypads can be used with the breakout. In this article we’ll see how to interface a 4×4 keypad with Arduino using the analog keypad breakout & the button pressed is displayed on the serial monitor.

Note:: You need to install the library to the Arduino IDE  before using the code

 

Continue Reading