peripherals
Class Potentiometer
java.lang.Object
peripherals.Peripheral
peripherals.Potentiometer
public class Potentiometer
- extends Peripheral
This class represents the potentiometer on CENG336 Board.
- Author:
- e1347061
Constructor Summary |
Potentiometer(PIC pic)
Constructor that initializes the potentiometer. |
Potentiometer(PIC pic,
boolean isEnabled)
Main constructor that initializes the potentiometer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Potentiometer
public Potentiometer(PIC pic)
- Constructor that initializes the potentiometer.
- Parameters:
id
- pic
-
Potentiometer
public Potentiometer(PIC pic,
boolean isEnabled)
- Main constructor that initializes the potentiometer.
- Parameters:
id
- pic
- isEnabled
-
update
public void update()
- Description copied from class:
Peripheral
- This abstract method communicates with the virtual card and
makes necessary changes on it.
- Specified by:
update
in class Peripheral
getAnalogData
public double getAnalogData()
- Returns:
- the analogData
setAnalogData
public void setAnalogData(double analogData)
- Parameters:
analogData
- the analogData to set
getPPanel
public PotentiometerPanel getPPanel()
- This method returns the visual representation of the potentiometer.