-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathindex.js
64 lines (57 loc) · 2.25 KB
/
index.js
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
57
58
59
60
61
62
63
64
var webduino = require('./src/webduino');
require('setimmediate');
require('./src/core/EventEmitter')(webduino);
require('./src/core/Logger')(webduino);
require('./src/core/util')(webduino);
require('./src/util/promisify')(webduino);
require('./src/core/Transport')(webduino);
require('./src/core/Pin')(webduino);
require('./src/core/Module')(webduino);
require('./src/core/Board')(webduino);
require('./src/core/WebArduino')(webduino);
require('./src/core/Arduino')(webduino);
require('./src/board/Smart')(webduino);
require('./src/board/Bit')(webduino);
require('./src/module/DataTransfer')(webduino);
require('./src/module/IRRAW')(webduino);
require('./src/module/DFPlayer')(webduino);
require('./src/module/LCD1602')(webduino);
require('./src/module/Led')(webduino);
require('./src/module/RGBLed')(webduino);
require('./src/module/Button')(webduino);
require('./src/module/Ultrasonic')(webduino);
require('./src/module/Servo')(webduino);
require('./src/module/Tilt')(webduino);
require('./src/module/Pir')(webduino);
require('./src/module/Shock')(webduino);
require('./src/module/Sound')(webduino);
require('./src/module/Relay')(webduino);
require('./src/module/Dht')(webduino);
require('./src/module/Buzzer')(webduino);
require('./src/module/Max7219')(webduino);
require('./src/module/ADXL345')(webduino);
require('./src/module/HX711')(webduino);
require('./src/module/SSD1306')(webduino);
require('./src/module/Barcode')(webduino);
require('./src/module/IRLed')(webduino);
require('./src/module/IRRecv')(webduino);
require('./src/module/Joystick')(webduino);
require('./src/module/MQ2')(webduino);
require('./src/module/Photocell')(webduino);
require('./src/module/Pot')(webduino);
require('./src/module/RFID')(webduino);
require('./src/module/Soil')(webduino);
require('./src/module/G3')(webduino);
require('./src/module/Stepper')(webduino);
module.exports = webduino;
webduino.transport.mqtt = require('./src/transport/NodeMqttTransport');
webduino.transport.websocket = require('./src/transport/NodeWebSocketTransport');
findTransport('serial', 'webduino-serial-transport');
findTransport('bluetooth', 'webduino-bluetooth-transport');
function findTransport(type, name) {
try {
if (require.resolve(name)) {
webduino.transport[type] = require(name);
}
} catch (e) {}
}