Control IHS1.1 board
Dependencies: mbed CLED Sensor
main.cpp@2:b5cde57c4400, 2020-10-23 (annotated)
- Committer:
- maro
- Date:
- Fri Oct 23 06:38:19 2020 +0000
- Revision:
- 2:b5cde57c4400
- Parent:
- 0:f9d9c47faaf0
Blinking indicator added
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
maro | 0:f9d9c47faaf0 | 1 | // *** IHS ver1.1a *** |
maro | 0:f9d9c47faaf0 | 2 | // Sensor.hで設定 *** every/normal, single-board/cube/cube-dual(row-length) *** |
maro | 0:f9d9c47faaf0 | 3 | #include "mbed.h" |
maro | 0:f9d9c47faaf0 | 4 | #include "CLED.h" |
maro | 0:f9d9c47faaf0 | 5 | |
maro | 0:f9d9c47faaf0 | 6 | Sensor sensor(-70); // The smaller the value, the higher the height |
maro | 0:f9d9c47faaf0 | 7 | CLED cled(11); // IHSxx |
maro | 0:f9d9c47faaf0 | 8 | |
maro | 0:f9d9c47faaf0 | 9 | int main() { |
maro | 0:f9d9c47faaf0 | 10 | // ********************** get initial value ************************ |
maro | 0:f9d9c47faaf0 | 11 | cled.set(10); |
maro | 0:f9d9c47faaf0 | 12 | wait(1); |
maro | 0:f9d9c47faaf0 | 13 | sensor.set_adAryInit(); // set initial value |
maro | 0:f9d9c47faaf0 | 14 | // *************************** loop ******************************** |
maro | 0:f9d9c47faaf0 | 15 | while(1) { |
maro | 0:f9d9c47faaf0 | 16 | sensor.setAd(); |
maro | 0:f9d9c47faaf0 | 17 | } |
maro | 0:f9d9c47faaf0 | 18 | } |