お天気ペーパー
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
*概要 [#x77f4f5a]
電子ペーパーに天気予報を表示します。ラズベリーパイでイン...
#ref(14862868559650.jpg)
*プログラム [#a5a9f06a]
- wget, wkhtmltopdf, netpnm, imagemagik, cu をインストー...
- 実行はroot権限で行います。
#!/usr/bin/perl
# -*- coding: utf-8 -*-
$url = (@ARGV == 1) ? $ARGV[0] : "http://feedproxy.googl...
$incmd = "wget -O - $url";
open(IN, "$incmd|") || die;
$outcmd = <<'EOS';
wkhtmltopdf -l --zoom 0.75 --encoding UTF-8 -B 0 -L 0 -R...
pdftoppm |
convert - -crop 200x96+8+8 -threshold 50000 -colors 2 bm...
cu --nostop -E '' -s 115200 -l /dev/ttyAMA0
EOS
open(OUT, "|$outcmd") || die;
while (<IN>) {
last if m|の週間予報</h3>|;
}
while (<IN>) {
last if m/]]/;
s/border="1"/border="0"/;
print OUT;
}
close(OUT);
exit;
*部品 [#a2f5a0b8]
- ラズベリーパイ
- 電子ペーパー Y-Con P020 4860円
-- メーカー http://www.yslab.co.jp/ycon_20.html
-- amazon https://www.amazon.co.jp/dp/B01B5PVT4E
終了行:
*概要 [#x77f4f5a]
電子ペーパーに天気予報を表示します。ラズベリーパイでイン...
#ref(14862868559650.jpg)
*プログラム [#a5a9f06a]
- wget, wkhtmltopdf, netpnm, imagemagik, cu をインストー...
- 実行はroot権限で行います。
#!/usr/bin/perl
# -*- coding: utf-8 -*-
$url = (@ARGV == 1) ? $ARGV[0] : "http://feedproxy.googl...
$incmd = "wget -O - $url";
open(IN, "$incmd|") || die;
$outcmd = <<'EOS';
wkhtmltopdf -l --zoom 0.75 --encoding UTF-8 -B 0 -L 0 -R...
pdftoppm |
convert - -crop 200x96+8+8 -threshold 50000 -colors 2 bm...
cu --nostop -E '' -s 115200 -l /dev/ttyAMA0
EOS
open(OUT, "|$outcmd") || die;
while (<IN>) {
last if m|の週間予報</h3>|;
}
while (<IN>) {
last if m/]]/;
s/border="1"/border="0"/;
print OUT;
}
close(OUT);
exit;
*部品 [#a2f5a0b8]
- ラズベリーパイ
- 電子ペーパー Y-Con P020 4860円
-- メーカー http://www.yslab.co.jp/ycon_20.html
-- amazon https://www.amazon.co.jp/dp/B01B5PVT4E
ページ名: