
<p>This quick start shows how to start M5StickC.<br> Please prepare M5StickC and cable, Smartphone(or PC) and Portable Battery Pack or AC Adaptor.</p>



<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 id="step1-start-m5stickc">Step1. Start M5StickC<a class="anchorjs-link " href="#step1-start-m5stickc" aria-label="Anchor" data-anchorjs-icon="#" style="padding-left: 0.375em;"></a></h2>



<div class="wp-block-columns">
<div class="wp-block-column">
<p>Press right bottom tiny button(power button) to power up. Charge M5StickC before use or stay connected to power supply by USB cable.</p>
</div>


<div class="embed-responsive embed-responsive-16by9">
<video  class="embed-responsive-item" autoplay="" controls="" loop="" muted="" src="images/startup-1.mp4""></video>
</div>


<div style="height:30px" aria-hidden="true" class="wp-block-spacer"></div>



<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 id="step2-connect-wi-fi">Step2. Connect Wi-Fi<a class="anchorjs-link " href="#step2-connect-wi-fi" aria-label="Anchor" data-anchorjs-icon="#" style="padding-left: 0.375em;"></a></h2>



<p>When not Wi-Fi configured yet, you will see Wi-Fi setting screen on your device. See and follow below document to setup Wi-Fi. Prepare smartphone or Laptop to connect Wi-Fi from M5StickC to configure Wi-Fi setting on your browser.</p>



<p><a href="/reference/obnizos-for-esp32/settings/setting-via-browser">Wi-Fi（Document）</a></p>



<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>



<p class="bg-attention">If an error is displayed or startup is not possible → See <a href="/quickstart/troubleshooting">Troubleshooting</a>.</p>



<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>



<h2 id="step3-run-the-program">Step3. Run the program<a class="anchorjs-link " href="#step3-run-the-program" aria-label="Anchor" data-anchorjs-icon="#" style="padding-left: 0.375em;"></a></h2>



<p>Please read the QR code displayed on the obniz Board with your smartphone. The program editor will open.</p>



<div class="wp-block-group bg-light"><div class="wp-block-group__inner-container">
<h4>Using PC</h4>



<p>Please open <a href="https://console.obniz.com/console/program">the Program editor</a>. When prompted for obnizID, please enter your obnizID (the 8-digit number displayed on your obniz Board).</p>
</div></div>



<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>



<div class="wp-block-columns">
<div class="wp-block-column">
<p>Tap (click) [Run] at the top right of the screen to open the run screen and run the program.</p>



<p>In the initial state, character input and LED ON / OFF buttons are displayed and be used. And Press “M5” button on your device then text on browser will be changed.</p>



<p>The program ends by closing the execution screen.</p>
</div>


<div class="embed-responsive embed-responsive-16by9">
<video  class="embed-responsive-item" autoplay="" controls="" loop="" muted="" src="images/apprun.mp4""></video>
</div>


<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>

### How to use obniz.js

In obniz.js 3.4.0 or later, if you specify ``Obniz.M5StickC()``, you can use the Easily call up M5StickC functions and IO without being aware of them.

Easy to use buttons, grooves and sensors.

![](images/m5stickc_io.jpg)

#### Buttons

```javascript
let obniz = new Obniz.M5StickC("OBNIZ_ID");
obniz.onconnect = async () => {
    obniz.buttonA.onchange = (flg)=>{
        console.log(`buttonA state : ${flg}`);
    };
}
```

#### Grove

```javascript
let obniz = new Obniz.M5StickC("OBNIZ_ID");
obniz.onconnect = async () => {
    const speaker = obniz.wired("Grove_Speaker", { grove: obniz.grove0});
    speaker.play(1000); //1000hz
    await obniz.wait(1000);
    speaker.stop();
}
```

#### Sensors

```javascript
let obniz = new Obniz.M5StickC("OBNIZ_ID");
obniz.onconnect = async () => {
    await obniz.setupIMUWait();
    // or old m5stickC
    // await obniz.setupIMUWait("SH200Q");
    console.log( await obniz.accelerationWait() ); console.log( await obniz.giroWait() )
    console.log( await obniz.giroWait() )
}
```

```javascript
let obniz = new Obniz.M5StickC("OBNIZ_ID");
obniz.onconnect = async () => {
    // LED blink
    obniz.led.blink();
    // IR LED TV and other remote controls can be created. It can only send.
    // The data from the remote control needs to be analyzed up front using another sensor.
    // https://obniz.com/sdk/parts/IRSensor/README.md
    // Send the analyzed data in an array.
    obniz.ir.send([1,1,1,1]);
}
```

<h2 id="step4-power-off-m5stickc">Step4. Power off M5StickC<a class="anchorjs-link " href="#step4-power-off-m5stickc" aria-label="Anchor" data-anchorjs-icon="#" style="padding-left: 0.375em;"></a></h2>



<div class="wp-block-columns">
<div class="wp-block-column">
<p>Long-Press power button over 5sec.</p>
</div>
<div style="height:60px" aria-hidden="true" class="wp-block-spacer"></div>

</div>


## Registering devices to the cloud

You can register devices in the cloud by going to [Register device](/reference/cloud/device-management/registration).
Registering to the cloud allows you to increase the level of security and manage your devices at a glance
