This file contains hidden or 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
class Transpiler { | |
code; | |
output; | |
preventTerminationWords = ["else","elif","except"]; | |
needTerminationWords = ["if","class","def","while","for","try"]; | |
opening =["(","{","["]; | |
closing =[")","}","]"]; | |
multiline; |
This file contains hidden or 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
lv.start() | |
# set background color to blue | |
scr = lv.scr_act() | |
scr.set_style_bg_color(lv.color(lv.COLOR_BLUE), lv.PART_MAIN | lv.STATE_DEFAULT) | |
# create a lv_img object and set it to Tasmota logo | |
logo = lv.img(scr) | |
logo.set_tasmota_logo() | |
logo.center() |
This file contains hidden or 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
class WC | |
def init() | |
import cam | |
cam.setup(7) | |
self.web_add_handler() | |
tasmota.add_driver(self) | |
end |
This file contains hidden or 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
# Convert raw data from Alexa remote control - Bluetooth | |
import wave | |
from pyogg import OpusDecoder | |
if __name__ == "__main__": | |
# Setup decoding | |
# ============== | |
# Create an Opus decoder | |
opus_decoder = OpusDecoder() |
This file contains hidden or 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
# Simple Berry driver for the BPR2S Air mouse (a cheap BLE HID controller) | |
import BLE | |
class ADPCM | |
static indexTable = [ | |
-1, -1, -1, -1, 2, 4, 6, 8, | |
-1, -1, -1, -1, 2, 4, 6, 8 | |
] |
This file contains hidden or 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
# Simple Berry driver for the Chromecast remote - VERY UNFINISHED | |
# DOES NOT REALLY WORK - RC disconnects after short time!!!!! | |
import BLE | |
var hid | |
class HID | |
static hid_service = "1812" | |
var hid_chars |
This file contains hidden or 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
# Simple Berry driver for the BPR2S Air mouse (a cheap BLE HID controller) | |
import BLE | |
class ADPCM | |
static indexTable = [ | |
-1, -1, -1, -1, 2, 4, 6, 8, | |
-1, -1, -1, -1, 2, 4, 6, 8 | |
] |
This file contains hidden or 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
diff --git a/lib/default/tamp/library.properties b/lib/default/tamp/library.properties | |
new file mode 100644 | |
index 000000000..c4bb469cd | |
--- /dev/null | |
+++ b/lib/default/tamp/library.properties | |
@@ -0,0 +1,7 @@ | |
+name=Tamp | |
+version=1.0 | |
+author= | |
+maintainer= |
This file contains hidden or 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
# Berry class to decode ADPCM sample | |
# ADPCM decoder implementation based on https://github.com/jwzhangjie/Adpcm_Pcm/blob/master/adpcm.c | |
class ADPCM | |
static indexTable = [ | |
-1, -1, -1, -1, 2, 4, 6, 8, | |
-1, -1, -1, -1, 2, 4, 6, 8 | |
] |
This file contains hidden or 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
# Simple Berry driver for the Google Daydream controller | |
import BLE | |
class BLE_DAYD : Driver | |
var buf | |
var connecting, connected, new_position | |
var time,seq,xO,yO,zO,xA,yA,zA,xG,yG,zG,xT,yT,button | |
def init(MAC,addr_type) |