0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

micro:bitで7セグLEDを使う

Posted at

この記事の内容

micro:bitで7セグLEDを使うためのメモ

7セグLEDとは

デジタル時計の数字をよく見ると7つの棒でできています 1だと2本、2だと5本の組み合わせ。
最大8の時に7本の棒が必要になります。この7本の棒を7つのセグメント、と呼び、数字を表示するLEDを7セグメントLED、通称7セグLEDと呼びます。

7セグLEDの入手

仕組みとしては 7セグLEDに加え、7セグLEDをコントロールするためのICが必要ですが、それらがすでに組み合わされモジュールが販売されています。
下記はアマゾンへのリンクです。

-4桁の7セグLED 5個入りで1900円程度、少し大きめのサイズ
https://amzn.to/46pn9EF

-4桁の7セグLED 4個入りで900円程度、少さめのサイズ
https://amzn.to/46Fy6Rp

サンプルプログラム

7セグLEDには CLK/DIO/5V/GND の4つの端子があります。
CLK/DIOはプログラムで指定したmicro:bitのポート(このサンプルの場合はCLK=P2、DIO=P1)に接続
5Vはmicro:bitの3Vへ、GNDはそれぞれのGNDにつなぎます。

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?