A
Arduino2mo ago
DavidM

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?
31 Replies
AnonEngineering
AnonEngineering2mo ago
does the Mega appear in Windows Device Manager under Ports?
DavidM
DavidMOP2mo ago
Yes - com4, MobiFlight communicates with it, no problem.
AnonEngineering
AnonEngineering2mo ago
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
DavidM
DavidMOP2mo ago
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...
AnonEngineering
AnonEngineering2mo ago
not COM1, Serial1. the 2560 has several hardware serial ports
DavidM
DavidMOP2mo ago
Oh, sorry, not sure how to do that 🤔 device manager? I see that output in the debug screen.
AnonEngineering
AnonEngineering2mo ago
you'd need to figure out which pins are which serial port, on a standard Mega they are labeled
No description
AnonEngineering
AnonEngineering2mo ago
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."
DavidM
DavidMOP2mo ago
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.
AnonEngineering
AnonEngineering2mo ago
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
DavidM
DavidMOP2mo ago
Gotcha -
AnonEngineering
AnonEngineering2mo ago
you just need to be able to format the data the way Mobi wants it
DavidM
DavidMOP2mo ago
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?
AnonEngineering
AnonEngineering2mo ago
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
DavidM
DavidMOP2mo ago
And I had to pick that one. 🤦‍♂️ That was based on MobiFlights recommendation too.
AnonEngineering
AnonEngineering2mo ago
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
DavidM
DavidMOP2mo ago
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 🙂
AnonEngineering
AnonEngineering2mo ago
here logic meets the real world, probably didn't care too much about Ohms Law in IT 😉
DavidM
DavidMOP2mo ago
This one measures 3.8cm x 5.4cm Right, its just the debugging part that's what I want to forget all about!
AnonEngineering
AnonEngineering2mo ago
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 statements
DavidM
DavidMOP2mo ago
Yes, 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.
AnonEngineering
AnonEngineering2mo ago
btw, you can simulate a Mega on Wokwi.com
DavidM
DavidMOP2mo ago
Ok, wokwi.com is like the others? Fritzing, and tinkercad? Remember, I'm still drinking from a fire hose!!
AnonEngineering
AnonEngineering2mo ago
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
DavidM
DavidMOP2mo ago
haven't done enough yet to experience any of that yet.
AnonEngineering
AnonEngineering2mo ago
beginners connect an LED with no current limiting, blows the LED or worse, the pin
DavidM
DavidMOP2mo ago
gonna check that out. gotta hit it, sorry big day tomorrow! Thanks for the chat!!
AnonEngineering
AnonEngineering2mo ago
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
DavidM
DavidMOP2mo ago
@AnonEngineering I'll take a look when I get in front of the laptop! Thanks! BTW, I'm in the states, Cleveland Ohio area.
AnonEngineering
AnonEngineering2mo ago
the in-laws are in Akron 😉

Did you find this page helpful?