Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get the node executing defined strings
- Loading branch information
1 parent
95e9fb2
commit 72ddc7e
Showing
6 changed files
with
64 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ node_modules/* | |
*.pyc | ||
*.pycache | ||
notes.md | ||
.vscode | ||
.vscode | ||
*.cache |
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,11 @@ | ||
import sys | ||
# import microbit | ||
import sys, os | ||
os.chdir(sys.argv[1]) | ||
|
||
FUNCTION = sys.argv[1] | ||
VALUE = sys.argv[2] | ||
import microbit | ||
|
||
print(FUNCTION, VALUE) | ||
FUNCTION = sys.argv[2] | ||
VALUE = sys.argv[3] | ||
|
||
print(FUNCTION, VALUE) | ||
|
||
microbit.display.scroll(VALUE) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,32 @@ | ||
<script type="text/javascript"> | ||
RED.nodes.registerType('bitio-wrapper',{ | ||
category: 'function', | ||
color: '#34b6ff', | ||
defaults: { | ||
name: {value:""} | ||
}, | ||
inputs:1, | ||
outputs:0, | ||
icon: "icon.png", | ||
label: function() { | ||
return this.name||"bitio-wrapper"; | ||
} | ||
}); | ||
</script> | ||
|
||
<script type="text/x-red" data-template-name="bitio-wrapper"> | ||
<div class="form-row"> | ||
<label for="node-input-name"><i class="icon-tag"></i> Name</label> | ||
<input type="text" id="node-input-name" placeholder="Name"> | ||
</div> | ||
|
||
<div class="form-row"> | ||
<label for="node-input-serialport"><i class="icon-tag"></i>Microbit Serial Port</label> | ||
<input type="text" id="node-input-serialport" placeholder="/dev/tty.usbmodemXXXX"> | ||
</div> | ||
|
||
</script> | ||
|
||
<script type="text/x-red" data-help-name="bitio-wrapper"> | ||
<p>A wrapper for the <a href="https://github.com/whaleygeek/bitio/">Bitio Python library</a> written by <a href="https://twitter.com/whaleygeek">David Whale</a>.</p> | ||
</script> |
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 |
---|---|---|
|
@@ -27,7 +27,6 @@ | |
} | ||
}, | ||
"dependencies": { | ||
"debug": "^3.1.0", | ||
"escape-string-regexp": "^1.0.5" | ||
"debug": "^3.1.0" | ||
} | ||
} |