Skip to content

Instantly share code, notes, and snippets.

@meganetaaan
Last active June 9, 2019 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meganetaaan/7422b981a217066ab827f9f3c43526c3 to your computer and use it in GitHub Desktop.
Save meganetaaan/7422b981a217066ab827f9f3c43526c3 to your computer and use it in GitHub Desktop.
Adding support to M5StickC on Moddable.
{
"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",
],
}
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