I just discovered a bug that may have plagued some of you who've tried the same code and circuit I describe here. I've previously used an older arduino with an atmega8 chip, which works smoothly. I just got a newer arduino with an atmega168, and I was so excited that I didn't have to manually reset every time I wanted to upload new code. Sadly, when I plugged in my newly soldered remote, I found that every time I tried to toggle the play/pause, I also advanced the song and vice versa. When I look at the serial data the two arduinos are sending, it turns out they're different. The atmega168 adds a lot of other unwanted stuff, as below. I'm unsure why this is at the moment or how to fix it, but Tom Igoe has been consulted, so hopefully we'll have an answer soon.
Atmega168 Play/Pause
FA
FF
55
3
2
0
1
FA
3C01
F3
FF
55
3
2
0
8
F3
3E01
Atmega8 Play/PauseFA
FF
55
3
2
0
1
FA
FFFF9C00
4 comments:
I'm looking at working on an iPod/Arduino project, and I have one of the 168 Arduinos. Was this problem ever cleared up?
Hi Peter,
I've taken the summer off from this project and am just getting started with it again. When I left off in May I hadn't yet figured out what's going on with the 168s - I just traded someone a newer 168 for their older 8. I do intend to start the troubleshooting in the near future though. Sorry!
-rosie
Rosie, Great work! It's inspiration for me to try to connect my 168 with my iPod.
One thing I noticed (and I'm new to the Arduino so could be very wrong) but your for loops count to <8 and not <7. When I've been playing I noticed an extra byte being sent.
I've not received my proper iPod connectors yet so not sure if it work yet.
Easty.
i agree with what paul said. (i, too have not tried this yet). it all looks very consistent with you pulling memory from out of the bounds of the array you wrote.
Post a Comment