Skip to content

Instantly share code, notes, and snippets.

View toyowata's full-sized avatar

Toyomasa Watarai toyowata

View GitHub Profile
@toyowata
toyowata / gist:607b736589520d94538c
Last active November 18, 2016 16:52
Fork/Cloneしたリポジトリを本家リポジトリに追従する
$ git remote add upstream git@github.com:mbedmicro/mbed.git
$ git fetch upstream
$ git merge upstream/master
$ git push

$ git remote add xxx_work git@github.com:mbedmicro/mbed_private_xxx.git
@toyowata
toyowata / private_settings.py
Last active March 10, 2017 00:39
My private_settings.py for mbed SDK
"""
mbed SDK
Copyright (c) 2011-2013 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
@toyowata
toyowata / esp8266_test.py
Last active June 26, 2018 03:18
AT command test code for the ESP8266 WiFi module
#! /usr/bin/env python
# codeing: utf-8
import serial
def send_normal_command(cmd):
ser.write(cmd)
rcv_buf = ""
while rcv_buf != "OK\r\n":
rcv_buf = ser.readline()
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(傾き)
@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
@toyowata
toyowata / clone_mbed_user_repo.py
Last active December 9, 2019 06:49
Create backup from mbed user code repository
#! /usr/bin/env python
# coding: utf-8
# This script creates copy from mbed user code repository
# You must install Mercurial package (pip install mercurial)
#
# Usage: python clone_mbed_user_repo.py <mbed_user_name> <password> <sessionid_developer of coockei>
# e.g. $ python clone_mbed_user_repo.py MACRUM password kjdt3hu1loppvyyxq60nhokssa1k48ul
#
# <sessionid_developer> can be found from developer tool of the web brawser
@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 / How-to-add-new-DAPLink-target.MD
Last active April 19, 2020 13:34
DAPLink 新規ターゲットの追加
@toyowata
toyowata / create_github-repo.md
Created June 26, 2020 02:26
Create GitHub repo and fetch from other repo