No.2 高輝度8LED Pmod 8LD
Pmod 8LD のページ
https://reference.digilentinc.com/reference/pmod/pmodacl/start
このページから
Example Projects の中の
Using the Pmod ACL with Arduino Uno - Application note のページにアクセス。
Pmod 8LD and Arduino Uno Fritzing Image の通りに配線して
Pmod 8LD and Arduino Uno CodeArduino のソースコードを Arduino IDE にコピペして
コンパイル & 書込み
サンプルブログを何の変更もせずに動きました。
/************************************************************************ * * Test of the Pmod module * ************************************************************************* * Description: Pmod_8LD * led will light on like in a famous television series from the 2000s * * Material * 1. Arduino Uno * 2. Module Pmod 8LD * ************************************************************************/ void setup() { for (int i=2; i<=9; i++) // configuration of pins 2 to 9 in output { pinMode(i,OUTPUT); } } void loop() { for (int i=1; i <=4; i++) // LED light on from exterior to interior of the module { digitalWrite(i+1,HIGH); digitalWrite(10-i,HIGH); delay(300); } delay(600); for (int i=1; i <=4; i++) // LED light on from interior ro exterior of the module { digitalWrite(6-i,LOW); digitalWrite(5+i,LOW); delay(300); } delay(600); }