-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add noe-rpio library - replace tsdoc with jsdoc eslint plugin
- Loading branch information
1 parent
b3d0faa
commit 98648a8
Showing
10 changed files
with
101 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// All pins must points on physical P1-P40 Raspberry Pi numbering scheme | ||
|
||
export const OPEN_STATUS_LIGHT_PIN = 40; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default as onInit } from './onInit'; | ||
export { default as onOpen } from './onOpen'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { OPEN_STATUS_LIGHT_PIN } from '../constants/pins'; | ||
|
||
const onInit = () => { | ||
rpio.open(OPEN_STATUS_LIGHT_PIN, rpio.OUTPUT, rpio.LOW); | ||
}; | ||
|
||
export default onInit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { OPEN_STATUS_LIGHT_PIN } from '../constants/pins'; | ||
|
||
const onOpen = () => { | ||
rpio.write(OPEN_STATUS_LIGHT_PIN, rpio.HIGH); | ||
rpio.sleep(5); | ||
rpio.write(OPEN_STATUS_LIGHT_PIN, rpio.LOW); | ||
}; | ||
|
||
export default onOpen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
import socketClient from 'socket.io-client'; | ||
import { onInit, onOpen } from './hooks'; | ||
|
||
const socket = socketClient('ws://localhost:3030'); | ||
|
||
socket.on('connection', () => { | ||
console.log('test'); | ||
}); | ||
onInit(); | ||
onOpen(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters