Last active
June 9, 2019 16:47
-
-
Save meganetaaan/7422b981a217066ab827f9f3c43526c3 to your computer and use it in GitHub Desktop.
Adding support to M5StickC on Moddable.
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
{ | |
"include": [ | |
"$(MODDABLE)/modules/drivers/st7735/manifest.json", | |
], | |
"config": { | |
"screen": "st7735", | |
"touch": "", | |
}, | |
"defines": { | |
"ili9341": { | |
"hz": 20000000, | |
"width": 80, | |
"height": 160, | |
"cs_pin": 5, | |
"dc_pin": 23, | |
"clk_pin": 13, | |
"rst_pin": 18, | |
"spi_port": "HSPI_HOST", | |
}, | |
}, | |
"modules": { | |
"*": [ | |
"$(MODULES)/pins/digital/monitor/*", | |
"$(MODULES)/pins/digital/monitor/esp32/*", | |
], | |
"setup/target": "./setup-target", | |
}, | |
"preload": [ | |
"monitor", | |
"setup/target", | |
], | |
} | |
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
import Digital from "pins/digital"; | |
import Monitor from "monitor"; | |
export default function (done) { | |
global.button = { | |
a: new Monitor({pin: 37, mode: Digital.InputPullUp, edge: Monitor.RisingEdge | Monitor.FallingEdge}), | |
b: new Monitor({pin: 39, mode: Digital.InputPullUp, edge: Monitor.RisingEdge | Monitor.FallingEdge}), | |
}; | |
button.a.onChanged = button.b.onChanged = nop; | |
//@@ microphone | |
done(); | |
} | |
function nop() { | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment