jockm / tinkerit

Automatically exported from code.google.com/p/tinkerit
0 stars 0 forks source link

Auduino not working on Arduino Mega2560 #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Not functioning on Mega2560.

Suspect the Mega1280 conditionals need extending to Mega2560 devices.

Original issue reported on code.google.com by cathed...@gmail.com on 11 Dec 2010 at 10:40

GoogleCodeExporter commented 8 years ago
I can confirm the bug and proposed fix.

I've changed line 34 of DmxSimple.cpp to:

#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || 
defined(__AVR_ATmega328P__) || defined(__AVR_ATmega1280__) || 
defined(__AVR_ATmega2560__)

It now works on the my Mega 2560.

Original comment by RossRy...@googlemail.com on 15 Jan 2011 at 7:15

GoogleCodeExporter commented 8 years ago
I'm kinda confused...is DmxSimple.cpp used with the Auduino?

Original comment by brett...@gmail.com on 16 Jan 2011 at 1:28

GoogleCodeExporter commented 8 years ago
Apologies.  I thought this 'issue' was with an arduino library called 
"DmxSimple".  This bug tracking system doesn't make it obvious which 
project/product a bug is raised against.

Hopefully the reporter, cathed... can clarify?

Original comment by RossRy...@googlemail.com on 16 Jan 2011 at 9:11

GoogleCodeExporter commented 8 years ago
Any chance you would wanna try to debug the problem we are having here with the 
audio on mega2560? LOL can't blame me for trying!

Original comment by brett...@gmail.com on 16 Jan 2011 at 11:02

GoogleCodeExporter commented 8 years ago
Any news about this issue?
Regards

Original comment by fernando...@gmail.com on 14 Oct 2011 at 6:38

GoogleCodeExporter commented 8 years ago
I just altered lines with

#..if defined(__AVR_ATmega1280__)

to also include the 256:

#..if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)

Adding the 256 to the conditionals seems to be sufficient b/c of the 
similarities between architectures.

Original comment by davidmic...@gmail.com on 8 Jan 2012 at 5:31

GoogleCodeExporter commented 8 years ago
I also altered the lines as said by #6 above. The LED now blinks but no sound 
output at all. Arduino UNO R3 works, but I need to use Mega 2560 R3.

Any suggestions?

Thanks in advance.

Original comment by renato.d...@gmail.com on 11 Jun 2012 at 9:16

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I also tried changing the line as per comment #6, with no success... has this 
ever been resolved?

Original comment by dfo...@gmail.com on 6 Oct 2012 at 9:38

GoogleCodeExporter commented 8 years ago
Davidmic's suggestion worked for me on my Arduino mega 2560 R3

I just altered lines with

#..if defined(__AVR_ATmega1280__)

to also include the 256:

#..if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)

Make sure you're wiring this up properly,

Auduino uses 5 controls. You can use anything that generates a 0-5V analogue 
signal, but the prototype uses five 4.7Kohm linear potentiometers. Connect one 
side of each potentiometer to GND. Connect the other side to the 5V pin on 
Arduino. Connect the middle (wiper) pins to Analog inputs 0 to 4 on the Arduino.

The audio comes out of PWM (Mega 2560) pin 3 (or pin 11 on ATmega8 Arduinos). 
The prototype uses a 1/4" jack socket, with the tip connected to pin 3 (or 11 
on ATmega8's) and the shield connected to GND. Plug the other end into an audio 
amplifier, and you're good to go.

The Arduino can drive a small piezo, speaker or headphones directly. Strictly 
speaking it outputs at 5V rather than the 1V line level, but most amplifiers 
don't seem to mind.

Original comment by dario.go...@gmail.com on 7 Dec 2012 at 9:07

GoogleCodeExporter commented 8 years ago
/try adding this line to the top of the sketch"
#include <arduino.h>
"

Original comment by lukassev...@gmail.com on 22 Nov 2014 at 10:20

GoogleCodeExporter commented 8 years ago
hi, I had the same problem. I solved using this fixed library for 2560:

https://github.com/TinkerKit/DmxMaster

Original comment by zeus...@gmail.com on 1 Feb 2015 at 10:42