Arduino Forumを調べてみたら、ばっちり同じ問題に関する書き込みがあった。結局、Arduino IDE 0017のバグだったようだ。
Sorry guys, this will be fixed in Arduino 0018. In the meantime, you can edit hardware/cores/arduino/wiring_analog.c and change:上記の通り修正したら問題なく使えるようになった。ADMUX = (analog_reference << 6) | (pin & 0x0f);
to:ADMUX = (analog_reference << 6) | (pin & 0x07);
Arduino Forum - Trouble with Mega Anolog in port.
0 件のコメント:
コメントを投稿