ニキシー管を点灯させるためのソースコードをRaspberry Piにアップロードしようとしたいのですが、シリアルポートの項目に以下のようにArduino UNOの選択肢が無いため、エラーになってしまいます。
どのようにすれば、選択肢を出せることができるでしょうか?
エラー
Arduino: 1.8.13 (Mac OS X), Board: "Arduino Uno"
Sketch uses 1040 bytes (3%) of program storage space. Maximum is 32256 bytes.
Global variables use 10 bytes (0%) of dynamic memory, leaving 2038 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
ソースコード
uint8_t currentValue = 0; #define NIXIE_1_A 2 #define NIXIE_1_B 3 #define NIXIE_1_C 4 #define NIXIE_1_D 5 #define NIXIE_2_A 6 #define NIXIE_2_B 7 #define NIXIE_2_C 8 #define NIXIE_2_D 9 #define NIXIE_3_A 10 #define NIXIE_3_B 11 #define NIXIE_3_C 12 #define NIXIE_3_D 13 #define NIXIE_4_A A0 #define NIXIE_4_B A1 #define NIXIE_4_C A2 #define NIXIE_4_D A3 void setup(){ pinMode(NIXIE_1_A, OUTPUT); pinMode(NIXIE_1_B, OUTPUT); pinMode(NIXIE_1_C, OUTPUT); pinMode(NIXIE_1_D, OUTPUT); nixieWrite(NIXIE_1_A, NIXIE_1_B, NIXIE_1_C, NIXIE_1_D, 0); } void nixieWrite(uint8_t a, uint8_t b, uint8_t c, uint8_t d, uint8_t value){ digitalWrite(d, (value & 0x08) >> 3); digitalWrite(c, (value & 0x04) >> 2); digitalWrite(b, (value & 0x02) >> 1); digitalWrite(a, value & 0x01); } void loop(){ delay(1000); currentValue++; if(currentValue > 9){ currentValue = 0; } nixieWrite(NIXIE_1_A, NIXIE_1_B, NIXIE_1_C, NIXIE_1_D, currentValue); }
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。