- ダウンロードしたRaspberry Pi OSを用意する
- ここにあるegnerate-userconf.sh の NEW_USERNAME, NEW_PASSWORDを書き換えて実行する(要Docker)
- 表示された -- /boot/userconf.txt の次の行を bootパーティションに userconf.txt として保存する
- bootパーティションの config.txt の末尾に
dtoverlay=pi3-miniuart-bt
を追記する - シリアル接続して起動する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
// DIPスイッチとボタンの状態をUSBシリアル出力で表示する。ボーレートは115200 | |
// DIPスイッチがONになっている数を7セグで表示する。またいずれかのボタンが押されたら小数点を表示する | |
// ビルトインLEDは LED_BUILTIN で定義されているが | |
// SCKと同じなので使わないこと | |
// 秋月電子のサンプルとはバイトオーダが逆なので注意 | |
// これ: MSBFIRST / 秋月: LSBFIRST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define SRR_LD 21 | |
#include <SPI.h> | |
// ビルトインLEDは LED_BUILTIN で定義されているが | |
// SCKと同じD13なので使わないこと | |
uint8_t pv; | |
void srrStart() { | |
SPI.begin(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
「半額寿司が買えなくて」 | |
作詞:なすーん | |
作曲:まめも | |
歌:初音ミク | |
♪=160 | |
イントロ: DGDG | |
[1] | |
D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# すべてのファイルを ../files にコピーするシェルスクリプトを生成する。 | |
# ただし、フォルダがない場合は新たに作成し、 | |
# 拡張子がhtm,html,js,css,txtの場合はgzip圧縮し、拡張子.gzを追加する。 | |
use strict; | |
use warnings; | |
use File::Find; | |
use feature 'say'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# --------------------------------------------- | |
# このファイルと同じところに置かれた全てのWAVファイルを | |
# ffmpegを通して1階層上のIMPORTフォルダに出力する | |
# --------------------------------------------- | |
use strict; | |
use warnings; | |
use Cwd 'getcwd'; | |
use feature 'say'; | |
use File::Basename; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# ----------------- | |
use strict; | |
use warnings; | |
use feature qw(say); | |
use Data::Dumper; | |
# NJM11100F1 | |
# NMD(JRC) https://www.nisshinbo-microdevices.co.jp/ja/products/ldo-linear-regulator/spec/?product=njm11100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
TARGET_HOST="監視するホスト" | |
PROWL_APIKEY="Prowlトークン" | |
PROWL_APPNAME="deadchecker" | |
hostAlive() { | |
ping -t 1 $TARGET_HOST > /dev/null 2>&1 | |
echo $? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use File::Basename; | |
sub usage() { | |
say ""; | |
say "[USAGE]"; | |
say " $0 [INFILE]"; |