Last change
on this file since 449 was 136, checked in by ertl-honda, 9 years ago |
ライブラリとOS及びベーシックなサンプルの追加.
|
File size:
447 bytes
|
Rev | Line | |
---|
[136] | 1 | #ifndef Multiplexer_h
|
---|
| 2 | #define Multiplexer_h
|
---|
| 3 |
|
---|
| 4 | #if ARDUINO >= 100
|
---|
| 5 | #include "Arduino.h"
|
---|
| 6 | #else
|
---|
| 7 | #include "WProgram.h"
|
---|
| 8 | #endif
|
---|
| 9 |
|
---|
| 10 | class Multiplexer{
|
---|
| 11 | public:
|
---|
| 12 | void begin(uint8_t* selectors, uint8_t Z, uint8_t length);
|
---|
| 13 | void selectPin(uint8_t num);
|
---|
| 14 | int getAnalogValue();
|
---|
| 15 | int getAnalogValueAt(uint8_t num);
|
---|
| 16 | bool getDigitalValue();
|
---|
| 17 | bool getDigitalValueAt(uint8_t num);
|
---|
| 18 | private:
|
---|
| 19 | uint8_t selectors[4];
|
---|
| 20 | uint8_t pin_Z;
|
---|
| 21 | uint8_t length;
|
---|
| 22 | };
|
---|
| 23 |
|
---|
| 24 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.