Skip to content

Commit

Permalink
Site updated: 2024-05-16 12:01:00
Browse files Browse the repository at this point in the history
  • Loading branch information
levi52 committed May 16, 2024
1 parent 3024baf commit 1494fb6
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions 2024/05/16/ESP32S3-输入设备Keypad/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
<meta property="og:image" content="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/port.png">
<meta property="og:image" content="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/key.png">
<meta property="og:image" content="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/keyd.png">
<meta property="og:image" content="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/IMG_1964.jpg">
<meta property="og:image" content="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/IMG_1963.jpg">
<meta property="og:image" content="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/key1.png">
<meta property="og:image" content="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/screen.png">
<meta property="og:image" content="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/switch.gif">
<meta property="og:image" content="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/enter.gif">
<meta property="article:published_time" content="2024-05-16T03:20:34.000Z">
<meta property="article:modified_time" content="2024-05-16T03:29:08.136Z">
<meta property="article:modified_time" content="2024-05-16T04:00:28.836Z">
<meta property="article:author" content="Levi52">
<meta property="article:tag" content="ESP32">
<meta property="article:tag" content="PlatformIO">
Expand Down Expand Up @@ -254,7 +254,7 @@ <h1 class="post-title" itemprop="name headline">
<span class="post-meta-item-text">发表于</span>


<time title="创建时间:2024-05-16 11:20:34 / 修改时间:11:29:08" itemprop="dateCreated datePublished" datetime="2024-05-16T11:20:34+08:00">2024-05-16</time>
<time title="创建时间:2024-05-16 11:20:34 / 修改时间:12:00:28" itemprop="dateCreated datePublished" datetime="2024-05-16T11:20:34+08:00">2024-05-16</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
Expand Down Expand Up @@ -390,8 +390,8 @@ <h2 id="main-cpp"><a href="#main-cpp" class="headerlink" title="main.cpp"></a>ma
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;Arduino.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;lvgl.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;freertos/FreeRTOS.h&gt;</span></span></span><br><span class="line"><span class="comment">// SCREEN</span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;./screen.h&quot;</span></span></span><br><span class="line"><span class="comment">// UI</span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;./lvgl_gui/ui.h&quot;</span></span></span><br><span class="line"><span class="comment">// 任务</span></span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">lvgl_task</span><span class="params">(<span class="type">void</span> *pt)</span></span>;</span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">setup</span><span class="params">()</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line"> Serial.<span class="built_in">begin</span>( <span class="number">115200</span> ); <span class="comment">// 串口初始化</span></span><br><span class="line"> <span class="built_in">lv_init</span>(); <span class="comment">// lvgl初始化</span></span><br><span class="line"> <span class="built_in">screen_init</span>(); <span class="comment">// 屏幕初始化</span></span><br><span class="line"> <span class="built_in">ui_init</span>(); <span class="comment">// UI初始化</span></span><br><span class="line"> <span class="built_in">xTaskCreatePinnedToCore</span>(lvgl_task, <span class="string">&quot;lvgl display&quot;</span>, <span class="number">1024</span> * <span class="number">15</span>, <span class="literal">NULL</span>, <span class="number">2</span>, <span class="literal">NULL</span>, <span class="number">1</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">loop</span><span class="params">()</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">lvgl_task</span><span class="params">(<span class="type">void</span> *pt)</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line"> <span class="keyword">while</span>(<span class="number">1</span>)</span><br><span class="line"> &#123;</span><br><span class="line"> <span class="built_in">lv_timer_handler</span>(); <span class="comment">/* let the GUI do its work */</span></span><br><span class="line"> <span class="built_in">vTaskDelay</span>(<span class="number">5</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<h1 id="效果"><a href="#效果" class="headerlink" title="效果"></a>效果</h1><p>修改程序后,编译烧录</p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/IMG_1964.jpg" alt="拨轮"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/IMG_1963.jpg" alt="SQ工程"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/key1.png" alt="拨轮"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/screen.png" alt="显示"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/switch.gif" alt="切换"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/enter.gif" alt="选中"></p>
<h1 id="END"><a href="#END" class="headerlink" title="END"></a>END</h1><center> 2024 <font color="#00bcd9">Levi5</font></center>
Expand Down
Binary file added 2024/05/16/ESP32S3-输入设备Keypad/key1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 2024/05/16/ESP32S3-输入设备Keypad/screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<link href="https://levi52.github.io/atom.xml" rel="self"/>

<link href="https://levi52.github.io/"/>
<updated>2024-05-16T03:29:08.136Z</updated>
<updated>2024-05-16T04:00:28.836Z</updated>
<id>https://levi52.github.io/</id>

<author>
Expand All @@ -21,7 +21,7 @@
<link href="https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/"/>
<id>https://levi52.github.io/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/</id>
<published>2024-05-16T03:20:34.000Z</published>
<updated>2024-05-16T03:29:08.136Z</updated>
<updated>2024-05-16T04:00:28.836Z</updated>


<summary type="html">无触摸,使用按键来控制屏幕控件</summary>
Expand Down
2 changes: 1 addition & 1 deletion css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ pre code {
vertical-align: middle;
}
.links-of-author a::before {
background: #71ff3d;
background: #faffad;
display: inline-block;
margin-right: 3px;
transform: translateY(-2px);
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ <h2 class="post-title" itemprop="name headline">
<span class="post-meta-item-text">发表于</span>


<time title="创建时间:2024-05-16 11:20:34 / 修改时间:11:29:08" itemprop="dateCreated datePublished" datetime="2024-05-16T11:20:34+08:00">2024-05-16</time>
<time title="创建时间:2024-05-16 11:20:34 / 修改时间:12:00:28" itemprop="dateCreated datePublished" datetime="2024-05-16T11:20:34+08:00">2024-05-16</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
Expand Down
4 changes: 2 additions & 2 deletions search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@
<figure class="highlight cpp"><table><tr><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;Arduino.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;lvgl.h&gt;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;freertos/FreeRTOS.h&gt;</span></span></span><br><span class="line"><span class="comment">// SCREEN</span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;./screen.h&quot;</span></span></span><br><span class="line"><span class="comment">// UI</span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;./lvgl_gui/ui.h&quot;</span></span></span><br><span class="line"><span class="comment">// 任务</span></span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">lvgl_task</span><span class="params">(<span class="type">void</span> *pt)</span></span>;</span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">setup</span><span class="params">()</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line"> Serial.<span class="built_in">begin</span>( <span class="number">115200</span> ); <span class="comment">// 串口初始化</span></span><br><span class="line"> <span class="built_in">lv_init</span>(); <span class="comment">// lvgl初始化</span></span><br><span class="line"> <span class="built_in">screen_init</span>(); <span class="comment">// 屏幕初始化</span></span><br><span class="line"> <span class="built_in">ui_init</span>(); <span class="comment">// UI初始化</span></span><br><span class="line"> <span class="built_in">xTaskCreatePinnedToCore</span>(lvgl_task, <span class="string">&quot;lvgl display&quot;</span>, <span class="number">1024</span> * <span class="number">15</span>, <span class="literal">NULL</span>, <span class="number">2</span>, <span class="literal">NULL</span>, <span class="number">1</span>);</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">loop</span><span class="params">()</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">lvgl_task</span><span class="params">(<span class="type">void</span> *pt)</span></span></span><br><span class="line"><span class="function"></span>&#123;</span><br><span class="line"> <span class="keyword">while</span>(<span class="number">1</span>)</span><br><span class="line"> &#123;</span><br><span class="line"> <span class="built_in">lv_timer_handler</span>(); <span class="comment">/* let the GUI do its work */</span></span><br><span class="line"> <span class="built_in">vTaskDelay</span>(<span class="number">5</span>);</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h1 id="效果"><a href="#效果" class="headerlink" title="效果"></a>效果</h1><p>修改程序后,编译烧录</p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/IMG_1964.jpg" alt="拨轮"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/IMG_1963.jpg" alt="SQ工程"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/key1.png" alt="拨轮"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/screen.png" alt="显示"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/switch.gif" alt="切换"></p>
<p><img src="/2024/05/16/ESP32S3-%E8%BE%93%E5%85%A5%E8%AE%BE%E5%A4%87Keypad/enter.gif" alt="选中"></p>
<h1 id="END"><a href="#END" class="headerlink" title="END"></a>END</h1><center> 2024 <font color="#00bcd9">Levi5</font></center>]]></content>
Expand Down

0 comments on commit 1494fb6

Please sign in to comment.