Kinetic Sculpture
3.1
Software to Architecture for the Junior Kinetic Sculpture Project
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Macros
Pages
KineticSculptureArchitecture
Switch.h
Go to the documentation of this file.
1
3
#pragma once
4
11
class
Switch
{
12
public
:
13
19
Switch
(
int
pin) {
20
switchPin = pin;
21
setupSwitch
();
22
}
23
29
void
setupSwitch
() {
30
pinMode(switchPin, INPUT_PULLUP);
31
}
32
38
byte
getState
() {
39
return
digitalRead(switchPin);
40
}
41
42
private
:
43
int
switchPin;
44
};
Switch::setupSwitch
void setupSwitch()
Definition:
Switch.h:29
Switch
Definition:
Switch.h:11
Switch::getState
byte getState()
Definition:
Switch.h:38
Switch::Switch
Switch(int pin)
Definition:
Switch.h:19
Generated by
1.8.6