I'm using an arduino mega to turn 12v RGB leds on and off via an LM298 module. Easy enough and the standard digital IO pins up to 53 work as expected .
However when I assign the analog outputs (pins 54 - 69) as outputs they don't function as expected. Strangely the LEDs turn on but not off. . . but sometimes if i toggle another random output they do switch off. .
Is there something else I need to consider when using analog in pins as outputs? Do I need pull up/down resistors or something etc?
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
thanks for your reply. I'm using firmata to control the board via the program 'pure data'. I believe that might be the problem, after further tests it seems the firmata doesn't work properly with a mega which is a shame. Thanks for your reply
bananaplug:
...to turn 12v RGB leds on and off via an LM298 module...
Did you compensate for the fact that an LM298 (L298) 'looses' several volts.
You might need a 15volt supply for your 12volt LEDs.
Or dump that L298, and use a logic level mosfet (as everybode else does).
Leo..