Hi, I am trying to get a Mindflex EEG to send its data over to my Arduino 2560 Mega for further processing, using this tutorial "How to Hack Toy EEGs | Frontier Nerds" as I am still learning C++. I've managed to get data out of it, but not consistently. It seemingly chooses random serial monitors to display on. I have closed and opened up to 15 instances of monitors before I got a working monitor instance, but that instance has always worked perfectly. I don't have this issue in any other programs so I am thinking that (if it is a hardware issue) it has to do with the Mindflex, but I am unsure. I have the Mindflex's T pin running to the Arduino's RX pin and I triple checked the ground. I also noticed that TX LED will not blink until I have a working serial monitor instance open then will continue blinking even after that instance is closed until a new, nonfucntional serial monitor is opened, if that helps.
The code is a little dated but I can't seem to figure out if/what it is doing to cause this.
When you open Serial Monitor, it resets the Arduino Mega board. I suspect this is somehow related to the behavior you're experiencing. My recommendation would be to add some more Serial.println() statements to your sketch so you can see whether the program is actually running, but just not receiving any data from the Mindflex when you have a "bad" Serial Monitor instance.
Thanks for the advice, just tested it. I put Serial.println() statements inside the setup and inside the loop, but I didn't get anything until it was a good one. Which means that the program isn't even running until it resets "properly"?
None that I would think should cause power problems. There are three connections: the T pin from the Mindflex to the Rx on the Arduino, the ground on the Arduino, and the cable running from the Arduino into the USB port my computer. I might be able to try another USB cable to make sure that is not the issue as it is acting as the power supply.