Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>[email protected]</title>

    <style>
    h1,h2,h3{text-indent:1em;font-family:"Small Fonts"}

    h1 {
      border-bottom: solid 3px skyblue;
      position: relative;
    }

    h1 {
      background: linear-gradient(transparent 70%, #a7d6ff 70%);
    }
    </style>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  </head>
  <body>
    <div class="content-fluid">
    <h1>Welcome to ESP32 Web Page</h1>
    <!-- タブ・メニュー -->
    <ul class="nav nav-tabs">
    	<li class="active"><a href="#content1" data-toggle="tab">What is ESP32 ?</a></li>
    	<li><a href="#content2" data-toggle="tab">ESP32's spec</a></li>
    	<li><a href="#content3" data-toggle="tab">Servo Control page</a></li>
    	<li><a href="#content4" data-toggle="tab">その他お知らせ</a></li>
    </ul>

    <!-- タブ内容 -->
    <div class="tab-content">
    	<div class="tab-pane active" id="content1">
    		<p>ESP32が新たな仲間に加わりました</p>

          <img src="https://tekuteku-embedded.xyz/wp-content/uploads/2020/10/ESP32-1-scaled.jpg" alt="" width="30%" height="30%">
          <h3>ESP32の4つのメリット</h3>
          <!-- Panel部分-->
          <div class="panel panel-info">
            <div class="panel-heading">
              はやい
            </div>
            <div class="panel-body">
               TensilicaのXtensa LX6マイクロプロセッサを採用<br>
               最大動作周波数240MHzを達成。ArduinoUNOに比べ実に10倍以上の速度差を実現。
            </div>
          </div>

          <div class="panel panel-success">
            <div class="panel-heading">
              やすい
            </div>
            <div class="panel-body">
              1500円と激安価格で入手可能。<br>
              ArduinoUNOが4000円に対して、価格でもUNOを圧倒。
            </div>
          </div>

          <div class="panel panel-primary">
            <div class="panel-heading">
              つながる
            </div>
            <div class="panel-body">
              Bluetooth Classic /BLE, WIFIモジュールを実装。<br>
              技適取得済みで、通信機能も盤石。
            </div>
          </div>

          <div class="panel panel-warning">
            <div class="panel-heading">
              わかる
            </div>
            <div class="panel-body">
              誰もが大好きArduinoIDEでの開発が可能。豊富なライブラリを
              簡単に利用でき、意のままにあつかえる。
            </div>
          </div>
          </div>



    	<div class="tab-pane" id="content2">
    		<h3>ESP32スペック情報</h3>

        <table class="table table-striped table-bordered table-hover">
         <tr><td>CPU</td><td>Xtensaデュアルコア32ビットLX6</td></tr>
         <tr><td>memory</td><td>520KiB SRAM<br>Bluetooth v4.2 BR/EDRとBLE</td></tr>
         <tr><td>無線接続</td><td>Wi-Fi 802.11 b/g/n/e/i</td></tr>
         <tr><td>SOC</td><td>ESP32-D0WDQ6</td></tr>
         <tr><td>SMTモジュール基板</td><td>ESP-WROOM-32</td></tr>
         <tr><td>開発ボード</td><td>ESP32-DevKitC </td></tr>
        </table>

    	</div>
    	<div class="tab-pane" id="content3">

          <hr>
          <div class="btn-group" data-toggle="buttons">
          	<label class="btn btn-success active">
          		<input type="radio" name="mode" value="pk" autocomplete="off" checked> ピカチューこっちむいて
          	</label>
          	<label class="btn btn-info">
          		<input type="radio" name="mode" value="fs" autocomplete="off"> フシギダネこっちむいて
          	</label>
          	<label class="btn btn-danger">
          		<input type="radio" name="mode" value="fr" autocomplete="off"> 自由な時間を過ごします
          	</label>
          </div>
          <hr>
          <h2>Current Your Target Angle is ..</h2>
              <div class="angle" style="text-indent: 5em; "><font size = "7"><span id="servoPos"></span></font>deg</div>
    	</div>

    	<div class="tab-pane" id="content4">
    		<p>このサイトはアフィリエイトサイトではありません。</p>
    	</div>
    </div>
  </div>
  <script>
  var servoP = document.getElementById("servoPos");

    $(function(){
       $( 'input[name="mode"]:radio' ).change( function() {
          var sel = $(this).val();
          if(sel == "pk")
          {
            servoP.innerHTML = 180;
            servo(180);
          }
          if(sel == "fs")
          {
            servoP.innerHTML = 0;
            servo(0);
          }
          if(sel == "fr")
          {

          }
       });
    });

    function freeControl(){

      if("fr"==$('input:radio[name="mode"]:checked').val())
      {
        servoP.innerHTML = Math.round( Math.random()*180 );
        servo(servoP.innerHTML);
      }
    }
    setInterval(freeControl, 2000);
    $.ajaxSetup({timeout:1000});
    function servo(pos) {
      $.get("/?value=" + pos + "&");
      {Connection: close};
    }
  </script>
  </body>
</html>

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console