Arduino Mega 2560 Pro (Embed)
Being new to the Arduino world, I must say its been a roller coaster of a ride. I'm a flight simmer - specifically in X-Plane. I use a product called MobiFlight which is an application that communicates between X-Plane and my Arduino Mega 2560 Pro.
What I'm finding that the Arduino IDE (with the Agent running) does not see the device. Its been challenging that the Mega 2560 Pro does not seem to be a popular device -- even for the Arduino app?
I have to admit, like I said, being new to the Arduino world, I'm still in the process of setting up and building my project which will contain 3 rotary encoders to start and will build from there with SPST switches.
Is there something I'm doing wrong with Arduino app that its not seeing the Arduino? withinn MobiFlight, I do a process call "Upload current firmware" to the board. This all works (directly to the board). Until I start to add devices (switches and encoders) to my board and startup MobiFlight from my sim computer, I cannot do anything further with the board until then. Any clues with what's not working in Arduino app?
I have to admit, like I said, being new to the Arduino world, I'm still in the process of setting up and building my project which will contain 3 rotary encoders to start and will build from there with SPST switches.
Is there something I'm doing wrong with Arduino app that its not seeing the Arduino? withinn MobiFlight, I do a process call "Upload current firmware" to the board. This all works (directly to the board). Until I start to add devices (switches and encoders) to my board and startup MobiFlight from my sim computer, I cannot do anything further with the board until then. Any clues with what's not working in Arduino app?
31 Replies
does the Mega appear in Windows Device Manager under Ports?
Yes - com4, MobiFlight communicates with it, no problem.
only one application can grab a Com port at a time, if MobiFlight is talking to the Mega the Arduino IDE can't
perhaps have Mobi talk to the Mega through Serial1 so the IDE can talk on Serial
I run them one at time. Unless MobiFlight still has it open some way. I'll check that.
{
"Version": "1.7.0"
}
{
"Commands": [
"list",
"open <portName> <baud> [bufferAlgorithm: ({default}, timed, timedraw)]",
"(send, sendnobuf, sendraw) <portName> <cmd>",
"close <portName>",
"restart",
"exit",
"killupload",
"downloadtool <tool> <toolVersion: {latest}> <pack: {arduino}> <behaviour: {keep}>",
"log",
"memorystats",
"gc",
"hostname",
"version"
]
}
{
"Hostname": "LAPTOP-QMH6NGR2"
}
{
"OS": "windows"
}
list
Serial Ports:
[
{
"Name": "COM1",
"SerialNumber": "",
"IsOpen": false,
"VendorID": "0x1A86",
"ProductID": "0x7523"
}
]
list
Serial Ports:
[
{
"Name": "COM1",
"SerialNumber": "",
"IsOpen": false,
"VendorID": "0x1A86",
"ProductID": "0x7523"
}
]
I changed the port over to COM1, no joy...
not COM1, Serial1. the 2560 has several hardware serial ports
Oh, sorry, not sure how to do that 🤔
device manager?
I see that output in the debug screen.
you'd need to figure out which pins are which serial port, on a standard Mega they are labeled

but the single CH340 is wired to "Serial0", pins 0 & 1
not sure exactly what the issue is
"Until I start to add devices (switches and encoders) to my board and startup MobiFlight from my sim computer, I cannot do anything further with the board until then."
That means the board does not have anything connected to it yet. As it stands, I only soldered all the header pins in place, that's the way it sits.
ok, if you add your switches and encoders you should be able to test the serial out by looking at the IDEs serial monitor. if all is well then connect Mobi to it
Gotcha -
you just need to be able to format the data the way Mobi wants it
What's wierd, I'm combing through the documentation on Arduino boards, and Mega 2560 Pro is no where to be found. Why is that do you think?
it's a custom board, breaking out the pins in a smaller form factor
the Mega 2560 chip is the same as a regular Arduino Mega
I don't find a website for Songhe, somewhat typical for Chinese clone manufacturers
And I had to pick that one. 🤦♂️ That was based on MobiFlights recommendation too.
hopefully the pin call outs are the same, and the chip is the same, so same code should work as it would on an official Arduino Mega
i have an "official" Mega here it's 11cm x 5.5cm
Arduino is all open source, clones are common
Ok, that's good to know. I'm kinda going in feet first on this project. I spent 40+ years in IT and you would think I still remember how to do this stuff 🙂
here logic meets the real world, probably didn't care too much about Ohms Law in IT 😉
This one measures 3.8cm x 5.4cm
Right, its just the debugging part that's what I want to forget all about!
a smaller form factor, might help if you have space constraints behind a panel
since it was recommended i'd guess (hope) the pins are the same
from the pic it has all the "stuff" a standard Mega clone has
debugging on an Arduino is a ton of
Serial.print
statementsYes, as is was recommended based on its form factor and double pins on each side and a few in the back
I was hoping to find a sketch code generator from a design factor, but read that its too new of a technology to do that yet.
btw, you can simulate a Mega on Wokwi.com
Ok, wokwi.com is like the others? Fritzing, and tinkercad?
Remember, I'm still drinking from a fire hose!!
imho Wokwi is better, it's more oriented to logic than Tinkercad. do bear in mind Wokwi does not simulate current, it's all happy if you connect 5v to ground 😉
at least Tinkercad gives you that nice explosion symbol if you draw too much current
but for switches, buttons, encoders Wokwi is fine
haven't done enough yet to experience any of that yet.
beginners connect an LED with no current limiting, blows the LED or worse, the pin
gonna check that out. gotta hit it, sorry big day tomorrow! Thanks for the chat!!
np, good luck with it!
for what it's worth, here's my impression of the type of thing you're after
https://wokwi.com/projects/437240750123836417
@AnonEngineering I'll take a look when I get in front of the laptop! Thanks! BTW, I'm in the states, Cleveland Ohio area.
the in-laws are in Akron 😉