質問編集履歴

1

記載箇所にミス

2019/04/11 03:04

投稿

wakka0014
wakka0014

スコア15

test CHANGED
File without changes
test CHANGED
@@ -102,46 +102,40 @@
102
102
 
103
103
  self.parser.add_argument("-t", "--text", help="The text to scroll on the RGB LED panel", default="21:52")
104
104
 
105
+
106
+
107
+ # 音を再生
108
+
109
+ # ★★★
110
+
111
+ sound_class = SoundClass()
112
+
113
+ sound_class.sound_play()
114
+
115
+
116
+
117
+ def run(self):
118
+
119
+ # LEDパネルに描画するcanvasを作成
120
+
121
+ offscreen_canvas = self.matrix.CreateFrameCanvas()
122
+
123
+ font = graphics.Font()
124
+
105
125
 
106
126
 
127
+ # フォントを読み込み
128
+
129
+ font.LoadFont("../../../fonts/10x20.bdf")
130
+
131
+ # 出力する文字の色を設定
132
+
133
+ textColor = graphics.Color(100, 100, 255)
134
+
135
+
136
+
107
137
  sound_class = SoundClass()
108
138
 
109
- sound_class.sound_play()
110
-
111
-
112
-
113
- # 音を再生
114
-
115
- # ★★★
116
-
117
- def sound_play():
118
-
119
- subprocess.call("aplay /home/pi/Desktop/rpi-rgb-led-matrix/bindings/python/samples/sound.wav", shell=True)
120
-
121
-
122
-
123
- def run(self):
124
-
125
- # LEDパネルに描画するcanvasを作成
126
-
127
- offscreen_canvas = self.matrix.CreateFrameCanvas()
128
-
129
- font = graphics.Font()
130
-
131
-
132
-
133
- # フォントを読み込み
134
-
135
- font.LoadFont("../../../fonts/10x20.bdf")
136
-
137
- # 出力する文字の色を設定
138
-
139
- textColor = graphics.Color(100, 100, 255)
140
-
141
-
142
-
143
- sound_class = SoundClass()
144
-
145
139
 
146
140
 
147
141
  while True: