0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Arduino Leonardo > Lチカ入門したら文鎮化した

Last updated at Posted at 2017-02-10
動作環境
Arduino IDE 1.6.6
Arduino Leonardo (30分前に使い始めたもの)

Arduino Leonardo を入手した。
5VのGPIO出力でSPIセンサの試用を検討。

5HzでHigh, Low信号を出すプログラムを書込みした。
オシロスコープで5Vの矩形波が出ることを確認した。

500kHzでHigh, Low信号を出す(であろう)プログラムを書込みした。
オシロスコープで5Vの矩形波は見られず、0Vのまま。

プログラムを間違ったようだ。

気を取り直してArduino IDEからLeonardoに書込みしようとしたが、シリアルポートの認識がない。

「USBデバイスが認識できません」というメッセージが表示される。

Leonardo復旧方法を探すことになった。

link

Arduinoトラブルシューティング アップロード編 by まりすさん
http://100year.cocolog-nifty.com/blog/2014/06/arduino-9471.html

Arduinoトラブルシューティング
http://garretlab.web.fc2.com/arduino_guide/trouble_shooting.html

Installing an Arduino Bootloader
https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader

こうなってしまった場合には、
https://raw.github.com/irkit/device/master/hardware/schematic.png のICSPヘッダを使って書き込むことができます。
http://arduino.cc/en/Tutorial/ArduinoISP や AVRISPmk2を使って、
ArduinoIDEからbootloaderを書き込む、とするとよいでしょう。

Arduino を AVR プログラマ(ISP: In-System Programmer)として使う
http://n.mtng.org/ele/arduino/ArduinoISP.html

IRKitのブートローダーを破壊したので直した by 橋本商会さん
http://shokai.org/blog/archives/8785

Arduinoの種類ごとのピン配置。
http://icircuit.net/arduino-boards-pin-mapping/141
Leonardoを用いてLeonardoのブートローダを書換えはできなさそう。

Note: SPI pins are mapped to ICSP port only

https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins/overview
こちらの方法では通常のUSB/serial programming interface経由でArduino IDEから書込みできないという注意書きがPDFファイルの13ページにある。
Arduino IDEから書込みできるようにするには、以下の記載通りにすればいいのだろうか。

Program this hex file to the Arduino using avrdude on the Raspberry Pi to restore the Arduino to its normal state and make programming work with the Arduino IDE again.

復旧作業

(追記 2017/02/15)

https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins/overview
を元に復旧を試みた。
ICSPピンとRaspberry Pi2のピンを接続して、Leonardoのbootloader hexファイルを書き込もうとしたが、programmer is not respondingとなった。

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?