Submit Search
Upload
Scroll pHAT HD に美咲フォント
•
0 likes
•
1,867 views
Yuriko IKEDA
Follow
Show Japanese text on Pimoroni's Scroll pHAT HD
Read less
Read more
Technology
Slideshow view
Report
Share
Slideshow view
Report
Share
1 of 37
Download now
Download to read offline
Recommended
Bag of tricks
Bag of tricks
brian d foy
Advanced modulinos
Advanced modulinos
brian d foy
Parsing JSON with a single regex
Parsing JSON with a single regex
brian d foy
Functional php
Functional php
Jean Carlo Machado
Git avançado
Git avançado
Jean Carlo Machado
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
brian d foy
The Magic Of Tie
The Magic Of Tie
brian d foy
全裸でワンライナー(仮)
全裸でワンライナー(仮)
Yoshihiro Sugi
Recommended
Bag of tricks
Bag of tricks
brian d foy
Advanced modulinos
Advanced modulinos
brian d foy
Parsing JSON with a single regex
Parsing JSON with a single regex
brian d foy
Functional php
Functional php
Jean Carlo Machado
Git avançado
Git avançado
Jean Carlo Machado
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
brian d foy
The Magic Of Tie
The Magic Of Tie
brian d foy
全裸でワンライナー(仮)
全裸でワンライナー(仮)
Yoshihiro Sugi
Unix shell scripting basics
Unix shell scripting basics
Abhay Sapru
De 0 a 100 con Bash Shell Scripting y AWK
De 0 a 100 con Bash Shell Scripting y AWK
Adolfo Sanz De Diego
Meet up symfony 16 juin 2017 - Les PSR
Meet up symfony 16 juin 2017 - Les PSR
Julien Vinber
C project on a bookshop for saving of coustmer record
C project on a bookshop for saving of coustmer record
Zaibi Gondal
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
Beware: Sharp Tools
Beware: Sharp Tools
chrismdp
Javascript - The basics
Javascript - The basics
Bruno Paulino
ES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript Skills
Stefano Ceschi Berrini
Taking Inspiration From The Functional World
Taking Inspiration From The Functional World
Piotr Solnica
Bioinformatica p4-io
Bioinformatica p4-io
Prof. Wim Van Criekinge
Generating Power with Yield
Generating Power with Yield
Jason Myers
Asynchronous I/O in PHP
Asynchronous I/O in PHP
Thomas Weinert
Beware sharp tools
Beware sharp tools
AgileOnTheBeach
Perl: Coro asynchronous
Perl: Coro asynchronous
Shmuel Fomberg
bank management system
bank management system
Aisha Aisha
Gogo shell
Gogo shell
jwausle
プログラム実行の話と OSとメモリの挙動の話
プログラム実行の話と OSとメモリの挙動の話
tatsunori ishikawa
Tgh.pl
Tgh.pl
iskabom
Using the Command Line with Magento
Using the Command Line with Magento
Matthew Haworth
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Matheus Marabesi
Ae internals
Ae internals
mnikolenko
Yg byev2e
Yg byev2e
longphi2812
More Related Content
What's hot
Unix shell scripting basics
Unix shell scripting basics
Abhay Sapru
De 0 a 100 con Bash Shell Scripting y AWK
De 0 a 100 con Bash Shell Scripting y AWK
Adolfo Sanz De Diego
Meet up symfony 16 juin 2017 - Les PSR
Meet up symfony 16 juin 2017 - Les PSR
Julien Vinber
C project on a bookshop for saving of coustmer record
C project on a bookshop for saving of coustmer record
Zaibi Gondal
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
Beware: Sharp Tools
Beware: Sharp Tools
chrismdp
Javascript - The basics
Javascript - The basics
Bruno Paulino
ES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript Skills
Stefano Ceschi Berrini
Taking Inspiration From The Functional World
Taking Inspiration From The Functional World
Piotr Solnica
Bioinformatica p4-io
Bioinformatica p4-io
Prof. Wim Van Criekinge
Generating Power with Yield
Generating Power with Yield
Jason Myers
Asynchronous I/O in PHP
Asynchronous I/O in PHP
Thomas Weinert
Beware sharp tools
Beware sharp tools
AgileOnTheBeach
Perl: Coro asynchronous
Perl: Coro asynchronous
Shmuel Fomberg
bank management system
bank management system
Aisha Aisha
Gogo shell
Gogo shell
jwausle
プログラム実行の話と OSとメモリの挙動の話
プログラム実行の話と OSとメモリの挙動の話
tatsunori ishikawa
Tgh.pl
Tgh.pl
iskabom
Using the Command Line with Magento
Using the Command Line with Magento
Matthew Haworth
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Matheus Marabesi
What's hot
(20)
Unix shell scripting basics
Unix shell scripting basics
De 0 a 100 con Bash Shell Scripting y AWK
De 0 a 100 con Bash Shell Scripting y AWK
Meet up symfony 16 juin 2017 - Les PSR
Meet up symfony 16 juin 2017 - Les PSR
C project on a bookshop for saving of coustmer record
C project on a bookshop for saving of coustmer record
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Beware: Sharp Tools
Beware: Sharp Tools
Javascript - The basics
Javascript - The basics
ES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript Skills
Taking Inspiration From The Functional World
Taking Inspiration From The Functional World
Bioinformatica p4-io
Bioinformatica p4-io
Generating Power with Yield
Generating Power with Yield
Asynchronous I/O in PHP
Asynchronous I/O in PHP
Beware sharp tools
Beware sharp tools
Perl: Coro asynchronous
Perl: Coro asynchronous
bank management system
bank management system
Gogo shell
Gogo shell
プログラム実行の話と OSとメモリの挙動の話
プログラム実行の話と OSとメモリの挙動の話
Tgh.pl
Tgh.pl
Using the Command Line with Magento
Using the Command Line with Magento
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Similar to Scroll pHAT HD に美咲フォント
Ae internals
Ae internals
mnikolenko
Yg byev2e
Yg byev2e
longphi2812
Dip Your Toes in the Sea of Security (PHP MiNDS January Meetup 2016)
Dip Your Toes in the Sea of Security (PHP MiNDS January Meetup 2016)
James Titcumb
Dip Your Toes in the Sea of Security (PHP Berkshire Nov 2015)
Dip Your Toes in the Sea of Security (PHP Berkshire Nov 2015)
James Titcumb
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
James Titcumb
HTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC Edition
Xavier Mertens
Top 10 php classic traps DPC 2020
Top 10 php classic traps DPC 2020
Damien Seguy
Blog Hacks 2011
Blog Hacks 2011
Yusuke Wada
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
John Ford
Python 炒股指南
Python 炒股指南
Leo Zhou
Top 10 php classic traps confoo
Top 10 php classic traps confoo
Damien Seguy
Inc
Inc
Lax Sindikat
Descobrindo a linguagem Perl
Descobrindo a linguagem Perl
garux
LDAP Synchronization Connector (LSC)
LDAP Synchronization Connector (LSC)
Jonathan Clarke
Remote IP Power Switches
Remote IP Power Switches
Chris Barber
Ten modules I haven't yet talked about
Ten modules I haven't yet talked about
acme
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Arc & Codementor
Php
Php
Linh Tran
Perl Dancer, FPW 2010
Perl Dancer, FPW 2010
Alexis Sukrieh
Hacking hhvm
Hacking hhvm
wajrcs
Similar to Scroll pHAT HD に美咲フォント
(20)
Ae internals
Ae internals
Yg byev2e
Yg byev2e
Dip Your Toes in the Sea of Security (PHP MiNDS January Meetup 2016)
Dip Your Toes in the Sea of Security (PHP MiNDS January Meetup 2016)
Dip Your Toes in the Sea of Security (PHP Berkshire Nov 2015)
Dip Your Toes in the Sea of Security (PHP Berkshire Nov 2015)
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
HTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC Edition
Top 10 php classic traps DPC 2020
Top 10 php classic traps DPC 2020
Blog Hacks 2011
Blog Hacks 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Security: The Great WordPress Lockdown - WordCamp Melbourne - February 2011
Python 炒股指南
Python 炒股指南
Top 10 php classic traps confoo
Top 10 php classic traps confoo
Inc
Inc
Descobrindo a linguagem Perl
Descobrindo a linguagem Perl
LDAP Synchronization Connector (LSC)
LDAP Synchronization Connector (LSC)
Remote IP Power Switches
Remote IP Power Switches
Ten modules I haven't yet talked about
Ten modules I haven't yet talked about
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Php
Php
Perl Dancer, FPW 2010
Perl Dancer, FPW 2010
Hacking hhvm
Hacking hhvm
More from Yuriko IKEDA
デフォルト誕生日を知らべてみた
デフォルト誕生日を知らべてみた
Yuriko IKEDA
Settaya
Settaya
Yuriko IKEDA
WordCamp 5.3 & Community
WordCamp 5.3 & Community
Yuriko IKEDA
Photography staff at WordCamp Tokyo 2019
Photography staff at WordCamp Tokyo 2019
Yuriko IKEDA
端末開発のススメ
端末開発のススメ
Yuriko IKEDA
WordPressでIoTをはじめよう
WordPressでIoTをはじめよう
Yuriko IKEDA
Local 10 周年パーティーに行ってきた話
Local 10 周年パーティーに行ってきた話
Yuriko IKEDA
Fastest routes from Meisei-univ to Shinjuku
Fastest routes from Meisei-univ to Shinjuku
Yuriko IKEDA
Faster route from Shinjuku to Meisei univ.
Faster route from Shinjuku to Meisei univ.
Yuriko IKEDA
Introduce raspberry pi's 7 years
Introduce raspberry pi's 7 years
Yuriko IKEDA
WordPress 次期バージョンと日本のコミュニティ
WordPress 次期バージョンと日本のコミュニティ
Yuriko IKEDA
カルト宗教の始め方
カルト宗教の始め方
Yuriko IKEDA
WordCamp Osaka の熱気を可視化してみた
WordCamp Osaka の熱気を可視化してみた
Yuriko IKEDA
WordPressで制御するこれからのIoT
WordPressで制御するこれからのIoT
Yuriko IKEDA
Create LED lightened Wapuu (LEDパネルで光るわぷーを)
Create LED lightened Wapuu (LEDパネルで光るわぷーを)
Yuriko IKEDA
世界No.1 CMS WordPressへのいざない
世界No.1 CMS WordPressへのいざない
Yuriko IKEDA
LEDマトリックスで光るわぷー(WordPressで指定編その1)
LEDマトリックスで光るわぷー(WordPressで指定編その1)
Yuriko IKEDA
Raspi intro-20170805
Raspi intro-20170805
Yuriko IKEDA
raspi-led-matrix
raspi-led-matrix
Yuriko IKEDA
架空鉄道紹介誌の制作
架空鉄道紹介誌の制作
Yuriko IKEDA
More from Yuriko IKEDA
(20)
デフォルト誕生日を知らべてみた
デフォルト誕生日を知らべてみた
Settaya
Settaya
WordCamp 5.3 & Community
WordCamp 5.3 & Community
Photography staff at WordCamp Tokyo 2019
Photography staff at WordCamp Tokyo 2019
端末開発のススメ
端末開発のススメ
WordPressでIoTをはじめよう
WordPressでIoTをはじめよう
Local 10 周年パーティーに行ってきた話
Local 10 周年パーティーに行ってきた話
Fastest routes from Meisei-univ to Shinjuku
Fastest routes from Meisei-univ to Shinjuku
Faster route from Shinjuku to Meisei univ.
Faster route from Shinjuku to Meisei univ.
Introduce raspberry pi's 7 years
Introduce raspberry pi's 7 years
WordPress 次期バージョンと日本のコミュニティ
WordPress 次期バージョンと日本のコミュニティ
カルト宗教の始め方
カルト宗教の始め方
WordCamp Osaka の熱気を可視化してみた
WordCamp Osaka の熱気を可視化してみた
WordPressで制御するこれからのIoT
WordPressで制御するこれからのIoT
Create LED lightened Wapuu (LEDパネルで光るわぷーを)
Create LED lightened Wapuu (LEDパネルで光るわぷーを)
世界No.1 CMS WordPressへのいざない
世界No.1 CMS WordPressへのいざない
LEDマトリックスで光るわぷー(WordPressで指定編その1)
LEDマトリックスで光るわぷー(WordPressで指定編その1)
Raspi intro-20170805
Raspi intro-20170805
raspi-led-matrix
raspi-led-matrix
架空鉄道紹介誌の制作
架空鉄道紹介誌の制作
Recently uploaded
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Deakin University
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Wonjun Hwang
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Fwdays
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Mattias Andersson
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
Neo4j
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
ngoud9212
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
null - The Open Security Community
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
jimielynbastida
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
BookNet Canada
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Fwdays
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
gvaughan
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Patryk Bandurski
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
Recently uploaded
(20)
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
Scroll pHAT HD に美咲フォント
1.
Scroll pHAT HD に美咲フォント
2.
Scroll pHAT いいよね
3.
Scroll pHAT HDでた
4.
日本語出せそう
5.
やってみた
6.
レシピ
7.
pimoroni.com
8.
pHATについて https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/
9.
Setup
10.
Raspbian
11.
Python library curl https://get.pimoroni.com/ scrollphathd
| bash
12.
Proxy 通す export http_proxy="user:pass@http:// proxy.example.jp:8080" export
https_proxy="user:pass@http:// proxy.example.jp:8080" Defaults env_keep+="http_proxy" Defaults env_keep+="https_proxy"
13.
ping 8.8.8.8 対策 curl
get.pimoroni.com/scrollphathd > scrhd.sh sudo ping -q -w 10 -c 1 8.8.8.8 | grep "received, 0" &> /dev/null && return 0 || return 1 curl -I shop.pimoroni.com | grep "HTTP/1.1 301 Moved" &> /dev/null && return 1 || return 0
14.
日本語表示
15.
Fontファイル /usr/lib/python2.7/dist-packages/ scrollphathd/fonts/font5x7.py data = { 0x00000041:
[[0x00,0xff,0xff,0xff,0x00], [0xff,0x00,0x00,0x00,0xff], [0xff,0x00,0x00,0x00,0xff], [0xff,0xff,0xff,0xff,0xff], [0xff,0x00,0x00,0x00,0xff], [0xff,0x00,0x00,0x00,0xff], [0xff,0x00,0x00,0x00,0xff]], } Unicode
16.
美咲フォント
17.
美咲フォント
18.
BDF ヘッダ STARTFONT 2.1 FONT
-Misaki-Gothic-Medium-R-Normal--8-80-75-75-C-80-jisx0208.1990-0 SIZE 8 75 75 FONTBOUNDINGBOX 8 8 0 -2 STARTPROPERTIES 19 FONTNAME_REGISTRY "" FOUNDRY "Misaki" …… CHARSET_REGISTRY "jisx0208.1990" CHARSET_ENCODING "0" DEFAULT_CHAR 8481 FONT_DESCENT 2 FONT_ASCENT 6 COPYRIGHT "Copyright(C) 2002-2012 Num Kadoma" ENDPROPERTIES
19.
1文字の定義 STARTCHAR 2442 ENCODING 9282 SWIDTH
960 0 DWIDTH 8 0 BBX 8 8 0 -2 BITMAP 0a 7e 10 1c 22 02 1c 00 ENDCHAR 美咲フォントは JIS X 0208 ビットマップ定義
20.
Unicode変換
21.
モナーフォント
22.
jis2unicode.pl cat misaki_gothic.bdf |
perl jis2unicode -b > misaki_gothic_unicode.bdf
23.
ヘッダは手動で変更 STARTFONT 2.1 FONT -Misaki-Gothic-Medium-R-Normal--8-80-75-75-C-80-iso10646-1 SIZE
8 75 75 FONTBOUNDINGBOX 8 8 0 -2 STARTPROPERTIES 19 FONTNAME_REGISTRY "" FOUNDRY "Misaki" …… CHARSET_REGISTRY "iso10646" CHARSET_ENCODING "1" DEFAULT_CHAR 8481 FONT_DESCENT 2 FONT_ASCENT 6 COPYRIGHT "Copyright(C) 2002-2012 Num Kadoma" ENDPROPERTIES
24.
Scroll pHAT 用変換
25.
BDF→Python 配列 STARTCHAR 2422 ENCODING
12354 SWIDTH 960 0 DWIDTH 8 0 BBX 8 8 0 -2 BITMAP 20 7c 20 3c 6a b2 64 00 ENDCHAR 0x00003042: [[0x00,0x00,0xff,0x00,0x00,0x00,0x00], [0x00,0xff,0xff,0xff,0xff,0xff,0x00], [0x00,0x00,0xff,0x00,0x00,0x00,0x00], [0x00,0x00,0xff,0xff,0xff,0xff,0x00], [0x00,0xff,0xff,0x00,0xff,0x00,0xff], [0xff,0x00,0xff,0xff,0x00,0x00,0xff], [0x00,0xff,0xff,0x00,0x00,0xff,0x00]],
26.
変換方法
27.
やっつけ Perl コード #!/usr/bin/perl
-w use strict; use Encode; local $_; print "# -*- coding: utf-8 -*-ndata = {n"; while (<>) { chomp; next unless /^STARTCHAR ([a-fA-Fd]+)/; my $startchar = $1; my $encoding = 0; my @bitmap = (); CHAR: while (<>) { chomp; if (/^ENCODING (d+)/) { $encoding = $1; } next unless /^BITMAP/; while (<>) { chomp; last CHAR if /^ENDCHAR/; push @bitmap, hex($_); } } if ($encoding == 0) { print STDERR "No BITMAP found!n"; next; } my $char = chr($encoding); my $last = pop(@bitmap); if ($last != 0) { printf(STDERR "No clear bottom line at %sn", encode('utf-8', $char)); } my @glyph = (); foreach (@bitmap) { my @line = (); if ($_ % 2) { printf(STDERR "LSB found at %s: %02Xn", encode('utf-8', $char), $_); } $_ >>= 1; for (my $j = 0 ; $j < 7 ; $j++) { unshift @line, ($+ % 2 ? '0xff' : '0x00'); $_ >>= 1; } push @glyph, sprintf('[%s]', join(',', @line)); } printf("0x%08X: [%s], #%sn", $encoding, join(",n", @glyph), $startchar, encode('utf-8', $char)); } print "width = 7nheight = 7n";
28.
完成した FONT コード #
-*- coding: utf-8 -*- data = { 0x00003001:[[0x00,0x00,0x00,0x00,0x00,0x00,0x00], [0x00,0x00,0x00,0x00,0x00,0x00,0x00], [0x00,0x00,0x00,0x00,0x00,0x00,0x00], [0x00,0x00,0x00,0x00,0x00,0x00,0x00], [0x00,0x00,0x00,0x00,0x00,0x00,0x00], [0xff,0x00,0x00,0x00,0x00,0x00,0x00], [0x00,0xff,0x00,0x00,0x00,0x00,0x00]],#2122:、 0x00003002:[[0x00,0x00,0x00,0x00,0x00,0x00,0x00], [0x00,0x00,0x00,0x00,0x00,0x00,0x00], [0x00,0x00,0x00,0x00,0x00,0x00,0x00], [0x00,0x00,0x00,0x00,0x00,0x00,0x00], [0x00,0xff,0x00,0x00,0x00,0x00,0x00], [0xff,0x00,0xff,0x00,0x00,0x00,0x00], [0x00,0xff,0x00,0x00,0x00,0x00,0x00]],#2123:。
29.
起動時に日本語表示
30.
起動時 cron $ crontab
-e @reboot /home/pi/startup.sh
31.
Scroll pHAT 判定 #!/bin/sh sudo
i2cdetect -y 1 0x74 0x74 | grep "74" - if [ "$?" -eq 0 ]; then sudo python /home/pi/ahiru.py fi fi
32.
「あひる焼き」表示 #!/usr/bin/env python # -*-
coding: utf-8 -*- import time import scrollphathd as scrhd import misaki_gothic scrhd.rotate(180) scrhd.write_string(u" あひる焼き", x=0, y=0, font=misaki_gothic, brightness=0.5) while True: scrhd.show() scrhd.scroll() time.sleep(0.05)
33.
電源ONでスクロール
34.
http://www.yuriko.net/ @lilyfanjp github.com/lilyfanjp/scrhd-ja https://www.slideshare.net/ lilyfan/scroll-phathdja
35.
想定質問
36.
想定質問2
37.
想定質問3
Download now