LEDを光らせよう! – Altair Embed製作日記

ロチェスター工科大学で電気工学を勉強している和田と申します。日本人とアメリカ人のハーフで、ボストンに住んでいます。今回、アルテアでインターンシップをさせていただき、Altair Embedを使うチャンスが得られたので、製作の日記をつくりました。日本語が苦手なので、英語で補足しながら書きます。

I am half Japanese and live in both Boston USA and Saitama Japan. To give background knowledge of what I knew before using the Embed, the software I have previous use are: Quartus, Eclipse, Arduino, Modelsim, Multisim and the last class I took for my major was microcontrollers. I am still a beginner to Engineering.

Altair Embedとはビジュアルのブロックダイヤグラムでコードができるソフトウェアです。この製作ではEmbedのほかにフィジカルコンピューティングのためのツールであるArduinoを使います。EmbedはArduinoをサポートしており、センサーを使ったりLEDを光らせるためのプログラムを書き込むことができます。

Arduino IDEとEmbedのインストール

Embedより先にArduino IDE(ソフトウェア)をインストールします。こうすることで、ファイルパスを簡単に設定できます。

Embedをインストールします。Embedは学生向け無償版であるAltair Student Editionに含まれています。Student Editionの申請方法はこちらを参考にしました。

Embedをインストールする時に、Select Embedded Targetsの設定でArduinoを選択する必要があるので注意してください。

Because I have experience using an Arduino, I was ecstatic know that Embed was compatible with Arduino and have many support resources for it.

秋葉原で買い物

秋葉原にある秋月電子でいるものを全部買いました。秋月電子は値段も安いし、いろいろな物があって秋葉原で買い物とても便利です。また、ネットでも買えるので助かります。

What better place to buy microcontroller pieces than in Akihabara, the Electric city of Japan? In the middle of anime posters and girls in maid outfits, there is a store small in size but vast in inventory called Akitsuki Denshi. This store has practically everything you need. The walls are covered in tiny pieces, it can get extremely overwhelming to be in.

せまい店でしたが、ものすごくたくさんの物を売っていたので、「ここに売られていない物はあるのか?」と思うほど圧倒されました。

店の人はいろいろ知っていますが、何を買いに来たのかを細かく伝えないと、なかなか欲しい物が見つかりません。

Unfortunately because I was not expecting such an intense store. I did not write out every piece I was looking for and ended up buying random LED lights that did not work for my purposes and got items without much thought despite how well labeled everything was.

While the store clerk was very knowledgeable and helpful, you will find little success on what you are looking for if you do not have a list of exactly what you came there for, especially if you don’t have general knowledge of the items.

買った物:ブレッドボード
ジャンパーワイヤ
LED
DS1307 (リアルタイムクロック)
220 Ω カーボン抵抗
Arduino Uno
スイッチ
UGCM1205XP (ブザー)
OSL10561-LB(7セグメントLED)
USB A-B
DMM (テスタ)
74HC595 (7セグメント用LEDドライバー)

Without my previously partially written shopping list, I wouldn’t have been able to get the items I came for.

I never personally purchased these items before as I always bought it from the school but now that I know the actual prices of these items, I now know that my school was probably ripping me off. Once I go back to school, I plan to talk to my professors on why they were over charging me, especially when they claim that they are losing money selling to students.

簡単なソフトウェアのテスト

初めてEmbedを使うので、まずは簡単にLEDを光らせることから始めました。Embedのチュートリアルをお手本として、進めます。

Arduino Unoを使うには、左にあるセッティングからEmbedded-> Arduino-> Arduino Config… をドラッグして、一番上におきます。


LEDを光らせるプログラムをEmbedで作るとこのようになります。三角波の山はLEDの光の強さになります。

プログラムが完成したのでCode Generation Propertiesを立ち上げてコンパイルします。

ダウンロードすると、Arduinoはプログラムを実行します。

ちなみにArduinoに書きこむCコードはこのようになります。

Arduinoの通電は確認できましたが、買ってきたLEDは光りませんでした。これがなぜか分からず、新しいLEDを買いに行くことになりました。

I was able to get the LED on my Arduino board to blink on and off without problem but not the physical LED that I bought. With no understanding on why this was the case, I needed to go back and buy new LEDS and a DMM to measure to see what the problem was.

新しく買ったLEDを使って光らせることができました。その後、ブザーと入れかえて、音が鳴ることも確認しました。

The new LEDs worked perfectly and I am still unable to understand why the first LEDs I bought didn’t work as I didn’t write down exactly which model I got due to being very intimidated at the store and buying the first LED I saw. The DMM showed the values I was looking for and next time I go back to the store I plan to find the specific LED that I bought and figure out why it didn’t work.

Once I got the LED to work, I just swapped it out with the buzzer and was able to get the buzzer to beep as well.

Embedはコードを書かなくてもプログラミングができる

私にはAltair Embedはとても新しい物でした。コードしなくてもプログラムができるのなんて夢みたいです。

Altair Embed is something entirely new to me. The idea of being able to program without coding seemed like a dream come true. The only things needed was a good understanding of the software and to know what I was doing. Both of which I did not have. Thankfully Altair has provided me of some resources on where to get started.

これからもEmbedを使い、いろいろ作ってみたいと思います。

With the ability to make a LED to blink, one of the simplest things you can do, I had all the confidence in the world to be able to create anything I wanted to.

0 0 votes
Article Rating

カテゴリー: 学生支援

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments