[{"data":1,"prerenderedAt":225},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fboards\u002Farduino-leonardo":3},{"id":4,"title":5,"body":6,"description":217,"extension":218,"meta":219,"navigation":220,"path":221,"seo":222,"stem":223,"__hash__":224},"content\u002Fdocs\u002Fboards\u002Farduino-leonardo.md","Arduino Leonardo",{"type":7,"value":8,"toc":211},"minimark",[9,13,17,22,122,126,140,144,168,172,207],[10,11,5],"h1",{"id":12},"arduino-leonardo",[14,15,16],"p",{},"The Leonardo's distinguishing trait is the ATmega32U4: the MCU and the USB controller are the same chip. That means it can present itself as a USB keyboard, mouse, MIDI device, or composite device — useful for HID-style projects layered on top of CONDUYT serial.",[18,19,21],"h2",{"id":20},"specs","Specs",[23,24,25,38],"table",{},[26,27,28],"thead",{},[29,30,31,35],"tr",{},[32,33,34],"th",{},"Property",[32,36,37],{},"Value",[39,40,41,50,58,66,74,82,90,98,106,114],"tbody",{},[29,42,43,47],{},[44,45,46],"td",{},"MCU",[44,48,49],{},"ATmega32U4, 16 MHz",[29,51,52,55],{},[44,53,54],{},"Flash",[44,56,57],{},"32 KB (4 KB bootloader)",[29,59,60,63],{},[44,61,62],{},"RAM",[44,64,65],{},"2.5 KB",[29,67,68,71],{},[44,69,70],{},"GPIO",[44,72,73],{},"20 digital (D0–D13, A0–A5) + interior pins",[29,75,76,79],{},[44,77,78],{},"ADC",[44,80,81],{},"A0–A5 plus A6–A11 on D4, D6, D8, D9, D10, D12",[29,83,84,87],{},[44,85,86],{},"PWM",[44,88,89],{},"D3, D5, D6, D9, D10, D11, D13",[29,91,92,95],{},[44,93,94],{},"I2C",[44,96,97],{},"1 bus — D2 (SDA), D3 (SCL)",[29,99,100,103],{},[44,101,102],{},"SPI",[44,104,105],{},"1 bus — D14 (CIPO), D15 (SCK), D16 (COPI) — on the ICSP header",[29,107,108,111],{},[44,109,110],{},"UART",[44,112,113],{},"Serial1 on D0\u002FD1 (Serial is the USB-virtual port)",[29,115,116,119],{},[44,117,118],{},"OTA",[44,120,121],{},"Not supported",[18,123,125],{"id":124},"flashing","Flashing",[14,127,128,129,134,135,139],{},"USB plug + auto-reset. Note the bootloader window is shorter than the Uno's (~750 ms) — if uploads fail intermittently, double-tap the reset button to force the bootloader, then flash. Flash from the ",[130,131,133],"a",{"href":132},"\u002Fplayground","Playground"," or ",[136,137,138],"code",{},"pio run -t upload -e leonardo",".",[18,141,143],{"id":142},"notes","Notes",[145,146,147,158,165],"ul",{},[148,149,150,153,154,157],"li",{},[136,151,152],{},"Serial"," is the USB CDC virtual port. CONDUYT uses this for transport, but it remains \"fully open\" only after the host opens it — ",[136,155,156],{},"if (!Serial)"," is a real check on this board.",[148,159,160,161,164],{},"I2C lives on D2\u002FD3, not the analog pins. Keyboard\u002Fmouse libraries use D2 (",[136,162,163],{},"PCINT",") — be aware of conflicts.",[148,166,167],{},"A6–A11 (analog inputs on certain digital pins) can be useful when you need extra ADC channels but the docs name them inconsistently.",[18,169,171],{"id":170},"compile-flag","Compile flag",[173,174,179],"pre",{"className":175,"code":176,"language":177,"meta":178,"style":178},"language-ini shiki shiki-themes github-light github-dark","[env:leonardo]\nplatform = atmelavr\nboard = leonardo\nframework = arduino\n","ini","",[136,180,181,189,195,201],{"__ignoreMap":178},[182,183,186],"span",{"class":184,"line":185},"line",1,[182,187,188],{},"[env:leonardo]\n",[182,190,192],{"class":184,"line":191},2,[182,193,194],{},"platform = atmelavr\n",[182,196,198],{"class":184,"line":197},3,[182,199,200],{},"board = leonardo\n",[182,202,204],{"class":184,"line":203},4,[182,205,206],{},"framework = arduino\n",[208,209,210],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":178,"searchDepth":191,"depth":191,"links":212},[213,214,215,216],{"id":20,"depth":191,"text":21},{"id":124,"depth":191,"text":125},{"id":142,"depth":191,"text":143},{"id":170,"depth":191,"text":171},"Leonardo board guide — ATmega32U4, native USB-HID for keyboard\u002Fmouse emulation.","md",{},true,"\u002Fdocs\u002Fboards\u002Farduino-leonardo",{"title":5,"description":217},"docs\u002Fboards\u002Farduino-leonardo","ezwzjVZS8IeVSSYYfQVTxjST97X9ZWBbxPson80bUZA",1777412314781]