-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.hpp
56 lines (36 loc) · 973 Bytes
/
test.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <time.h>
#include <unistd.h>
#include <stdio.h>
#include "stairs.h"
#define INPUT 1
#define OUTPUT 2
#define HIGH 3
#define LOW 4
struct TlcTest
{
void init();
void update();
void set(byte pin, int mode) { stair[pin] = mode; }
void sonar1enable() { sonar1 = true; }
void sonar1disable() { sonar1 = false; }
void sonar2enable() { sonar2 = true; }
void sonar2disable() { sonar2 = false; }
bool is_enabled_sonar1() { return sonar1; }
bool is_enabled_sonar2() { return sonar2; };
private:
int stair[STAIRS_COUNT];
bool sonar1;
bool sonar2;
};
extern TlcTest Tlc;
void setup();
void loop();
void delay(useconds_t delay);
unsigned long millis();
void pinMode(const byte pin, const byte mode);
void digitalWrite(const byte pin, const byte mode);
void delayMicroseconds(useconds_t delay);
unsigned int pulseIn(const byte pin, const byte mode, useconds_t timeout);