I tested the system with Arduino Duemilanove, everything works nicely. Duemilanove is recognized as COM4 and I can read the data nicely from the serial.
Duemilanove has only 6 pwms, and that is not enough for my application. So I needed to change to Mega 2560.
Now the problems start, Mega is recognized to COM5 and even if I change this to the software sending the data, it doesn't come alive.
Any ideas where to start to dig out the problem? What's the difference between Duemilanove and Mega?
What's the difference between Duemilanove and Mega?
From the point of view of reading serial data, none. There are, of course, many differences - number of pins, which pins do what, number of timers, amount of memory, etc.
Which Mega do yo have? The 1280 and 2560 also differ in the kind of hardware that maps the USB data to serial data.
Hi,
I'm running Mega 2560. Serial communication is going thru USB. I guess I should get the exact same code (except pwm out pin numbers) working on Mega as on Duemilanove.
Why duemilanove maps as COM4 and Mega as COM5. I changed COM5 => COM4 on advanced com settings, but it had no effect.
Probably need to see the code on the Arduino to figure that out.
Why duemilanove maps as COM4 and Mega as COM5.
One of the (many) mysteries of Windows. The name is not important, though. The Mega (or Duemilanove) has no idea that the PC supports more than one serial port, and, therefore, names them.
I get my code working with a testing software where I have sliders and I'm capable of sending different nine byte messages to arduino. each byte can be set by slider:
e.g: 0,0,0, 0,0,0, 0,0,0
or 255,255,255, 0,0,0 ,255,255,0
The code works nicely. But when I test this with BobLight I don't get any functionality. On duemilanove this works on both (test software and boblight)
I noticed that when using boblight and mega the little inbuild "L"-led near RX and TX leds is always on. What does that mean?
When I use Mega with test software and system works this led is not on?
I found one new weird feature. I try to explain it and hopefully it'll help some pro to understand the problem and one could then give me hints.
In the test program I'm capable of opening the COM port and then starting to sending the data with separate push-buttons.
This routine works:
open the port
wait a sec (arduino blinks 13 led when opening com and I guess resetting)
start sending data
But if I do it like this:
open the port
start sending the data right away (I click two button quickly)
it wont work.
This works in duemilanove in both ways!?!
In BobLight I can't wait before starting the data sending so I need to figure out a way handling this on Arduino side.
Any Ideas?
I tried to put delay and flush in the beginning of the code but it doesn't help. Arduino hangs already when the com port is opened and data sending is started.
Some folks have had problems disabling the autoreset on a board that uses an Atmega8U2 instead of a FTDI (like the Mega 2560). There are reports that a capacitor from RESET to GND works. Search the forum for details.
I bought some capacitors from the local dealer.
I grabbed 1uF, 2,2uF and 10uF capacitors. I didn't find any exact value for this. But those three values were picked from threads where people have had luck using capacitor for disabling auto reset. I'll test those in the evening.
Drop a line if you've used some other values succesfully or my values with no success.
The capacitor trick helped.
I was able to disable auto reset when COM-port is opened plugging a 10uF capacitor between GND and Reset pins.
This fixed the hanging problem. Still it is annoying that this needs to be done if a software on pc starts sending data right after port opening.
thanks guys (Coding Badly)
Hi, ive been trying to get my 2560 working with boblight.
I was wondering if someone could post the arduino code that works with the 2560 and boblight and also the boblight config file.
Ive been trying to get this to work for days....