Skip to content

Instantly share code, notes, and snippets.

View toyowata's full-sized avatar

Toyomasa Watarai toyowata

View GitHub Profile
@toyowata
toyowata / main.cpp
Created September 9, 2021 10:28
Socket API example for Mbed OS 6.x
/* WiFi Example
* Copyright (c) 2016 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@toyowata
toyowata / Mbed-2020-11.md
Last active November 28, 2020 12:36
mbed祭り 2020@秋のオンラインまとめ

mbed祭り 2020@秋のオンラインまとめ

Mbedユーザー(バーチャル)ミートアップイベント「mbed祭り 2020@秋のオンライン」が、2020年11月28日(土)にYoutube Liveで行われました。

Twitterでは #mbed_fest ハッシュタグ付きのつぶやきが、多数ありました。ありがとうございます。Twitterのまとめは、こちらです。

https://togetter.com/li/1629205

イベント当日の模様は、YouTubeライブ配信されました。動画はこちらからご覧になれます。

@toyowata
toyowata / create_github-repo.md
Created June 26, 2020 02:26
Create GitHub repo and fetch from other repo
@toyowata
toyowata / readme_esptool.md
Last active February 13, 2022 02:14
Usage of esptool.py

Install esptool.py

$ pip3 install esptool
$ esptool.py version
esptool.py v3.2
3.2

Clone ESP8266 firmware

@toyowata
toyowata / mbed_app.json
Created February 11, 2020 01:51
Mbed bare-metal profile example
{
"requires": ["bare-metal"],
"target_overrides": {
"LPC11U68" : {
"target.device_has_add" : ["USTICKER"],
"target.tickless-from-us-ticker" : true,
"target.boot-stack-size" :"0x400"
}
}
}
@toyowata
toyowata / main.cpp
Created December 9, 2018 01:50
reboot device example for simple-mbed-cloud-client template
// ----------------------------------------------------------------------------
// Copyright 2016-2018 ARM Ltd.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
let last_value = 0
let 傾き = 0
let rainbow: neopixel.Strip = null
rainbow = neopixel.create(DigitalPin.P0, 30, NeoPixelMode.RGB)
rainbow.showRainbow(1, 360)
last_value = 0
basic.forever(() => {
傾き = input.rotation(Rotation.Pitch)
if (last_value != 傾き) {
rainbow.rotate(傾き)