STM32 HAL DHT11

记录一次CUBEIDE的DHT11代码调试 文末有贴代码,亲测可用 STM32CUBEIDE 首先本文是基于STM32官方出品的CUBEIDE进行代码编写和调试的 环境搭建 官网下载之后安转完成(软件安装后可能需要登录才可以下载相关库文件...

应用1.1k
theme) } applyThemeToGiscus(theme) } // giscus 自定义css const applyThemeToGiscus = (theme) => { // theme = theme === 'auto' ? 'https://hp-l.github.io/headimg/css/giscus.css' : theme theme = theme === 'auto' ? 'custom' : theme // theme = theme === 'auto' ? 'preferred_color_scheme' : theme const cmt = document.getElementById('giscus') if (cmt) { // This works before giscus load. cmt.setAttribute('data-theme', theme) } const iframe = document.querySelector('#comments > section.giscus > iframe') if (iframe) { // This works after giscus loaded. const src = iframe.src const newSrc = src.replace(/theme=[\w]+/, `theme=${theme}`) iframe.src = newSrc } } const switchTheme = () => { // light -> dark -> auto -> light -> ... const currentTheme = document.documentElement.getAttribute('data-theme') let newTheme; switch (currentTheme) { case 'light': newTheme = 'dark' break case 'dark': newTheme = 'auto' break default: newTheme = 'light' } applyTheme(newTheme) window.localStorage.setItem('Stellar.theme', newTheme) const messages = { light: `切换到浅色模式`, dark: `切换到深色模式`, auto: `切换到跟随系统配色`, } hud?.toast?.(messages[newTheme]) } (() => { // Apply user's preferred theme, if any. const theme = window.localStorage.getItem('Stellar.theme') if (theme !== null) { applyTheme(theme) } })()