[{"data":1,"prerenderedAt":73},["ShallowReactive",2],{"example-page-esp32c3-button":3},{"id":4,"info":5,"parts":6,"wired":20,"refs":21,"nets":22,"moreNets":67,"code":68},"esp32c3-button","ESP32-C3 as on the SuperMini board: RISC-V core (RV32IMC, 160 MHz) with real Zephyr firmware. Button SW1 on GPIO9 (BOOT) switches the blue LED on GPIO8 through the GPIO interrupt. Swap the firmware in the inspector: blinky, fade_led (LEDC PWM), hello_world (UART on GPIO21). Your own firmware: load zephyr.elf or zephyr.bin for esp32c3_devkitm.",[7,10,12,14,16,18],[8,9],"button",1,[11,9],"capacitor",[13,9],"esp32c3",[15,9],"led",[17,9],"resistor",[19,9],"vdc",false,{"C1":11,"D1":15,"SW1":8,"U1":13,"V1":19,"R1":17},[23,40,48,54,61],{"name":24,"pins":25},"0",[26,29,32,34,37],[27,28],"C1","2",[30,31],"D1","K",[33,28],"SW1",[35,36],"U1","GND",[38,39],"V1","−",{"name":41,"pins":42},"3V3",[43,45,46],[27,44],"1",[35,41],[38,47],"+",{"name":49,"pins":50},"BOOT",[51,52],[33,44],[35,53],"GPIO9",{"name":55,"pins":56},"LED",[57,59],[58,44],"R1",[35,60],"GPIO8",{"name":62,"pins":63},"LED_A",[64,66],[30,65],"A",[58,28],0,{"file":69,"lang":70,"text":71,"lines":72,"more":20},"src\u002Fmain.c","c","\u002F*\n * SPDX-FileCopyrightText: Copyright The Zephyr Project Contributors\n * SPDX-License-Identifier: Apache-2.0\n *\u002F\n\n#include \u003Cinttypes.h>\n#include \u003Czephyr\u002Fdrivers\u002Fled.h>\n#include \u003Czephyr\u002Finput\u002Finput.h>\n#include \u003Czephyr\u002Fkernel.h>\n#include \u003Czephyr\u002Fsys\u002Fprintk.h>\n\n#define LED0_NODE DT_ALIAS(led0)\n\n#if DT_NODE_HAS_STATUS_OKAY(DT_PARENT(LED0_NODE))\nstatic const struct led_dt_spec led0 = LED_DT_SPEC_GET(LED0_NODE);\n#else\nstatic const struct led_dt_spec led0;\n#endif\n\nstatic void button_input_cb(struct input_event *evt, void *user_data)\n{\n\tif (evt->sync == 0) {\n\t\treturn;\n\t}\n\n\tprintk(\"Button %d %s at %\" PRIu32 \"\\n\",\n\t       evt->code,\n\t       evt->value ? \"pressed\" : \"released\",\n\t       k_cycle_get_32());\n\n\tif (led0.dev != NULL) {\n\t\tled_set_brightness_dt(&led0, evt->value ? 100 : 0);\n\t}\n}\n\nINPUT_CALLBACK_DEFINE(NULL, button_input_cb, NULL);\n\nint main(void)\n{\n\tprintk(\"Press the button\\n\");\n\n\tk_sleep(K_FOREVER);\n\n\treturn 0;\n}",45,1796304400735]