Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scripts-perso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Daniel Stan
scripts-perso
Commits
41932eda
Commit
41932eda
authored
Mar 05, 2017
by
Daniel STAN
Committed by
Daniel STAN
Mar 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lotus qui marche
parent
8ccf9c7b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
arduino/lotus/lotus.ino
arduino/lotus/lotus.ino
+1
-1
bin/lotus
bin/lotus
+1
-1
remote/remote.py
remote/remote.py
+9
-2
No files found.
arduino/lotus/lotus.ino
View file @
41932eda
...
...
@@ -19,7 +19,7 @@ void setup()
{
// Default light
pinMode
(
PIN_BULB
,
OUTPUT
);
digitalWrite
(
PIN_BULB
,
LOW
);
digitalWrite
(
PIN_BULB
,
HIGH
);
// Serial !
Serial
.
begin
(
9600
);
...
...
bin/lotus
View file @
41932eda
#!/bin/bash
DEV
=
/dev/rfcomm
2
DEV
=
/dev/rfcomm
3
echo
"
$1
"
>
$DEV
remote/remote.py
View file @
41932eda
...
...
@@ -76,11 +76,18 @@ def process_line(response):
# return
# TODO
if
response
.
startswith
(
b
'Unkwon: 16621663'
):
call
([
'lotus'
,
'
1
'
])
call
([
'lotus'
,
'
U
'
])
return
if
response
.
startswith
(
b
'Unkwon: 16625743'
):
call
([
'lotus'
,
'
0
'
])
call
([
'lotus'
,
'
D
'
])
return
if
response
.
startswith
(
b
'Unkwon: 16607383'
):
call
([
'lotus'
,
'f'
])
return
if
response
.
startswith
(
b
'Unkwon: 16623703'
):
call
([
'lotus'
,
'o'
])
return
if
response
.
startswith
(
CONTROL
):
key
=
response
[
len
(
CONTROL
):].
strip
().
lower
()
if
key
==
b
'pause'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment