Okay, Well this is a rather long explanation so Ill try to keep it as short as possible. I have an Arduino MEGA 2560 and I have an Arduino Leonardo coming in the mail. My project is for a racing/driving simulation setup. Moving Seat, Car Gauges, Switches and buttons, Etc.
I am not building the moving seat just yet, This is just about the guages and the switches.
My plan is, To use the MEGA to control the gauges, Turn indicators, Rev limiter,Lights, etc LEDs, and have the Leonardo emulate a keystroke when a toggle is flipped. The Leonardo would only be for 5-8 toggles(keyboard keys), as I cannot control all of the other planned goodies off of 1 Leonardo, And since you cannot emulate keystrokes with a MEGA.
I would be sending 5-20 sensor readings to the Arduino, along with receiving 5-8 readings.
I have done some research on the internet from this and everyone seems to have their own way of doing it, And theres no telling as to what actually works. Is there a way to just piggyback them off of one another that way I dont have to use 2 USB ports?, Assuming you can Send/Receive data over USB serial simultaneously.
How hard would that be to actually code?
Whoops, Should of did my research and bought a due. could of did it all off of one board. OOPS.
as I stated in the original post, The MEGA cannot emulate keystrokes. I cannot achieve all of my goals with 1 board. I have to use 2, Unless I go out and spend the money for a Due.
I am trying to control 4-5 servos and 5-15 LEDs on the MEGA, And use 5-8 toggle switches as inputs on the Leonardo for keyboard emulation. Since the Leonardo only has so many pins, I have to also use another arduino, And since I have a MEGA laying around, Im gonna use it. I cannot use just the Leonardo for this project, Or thats what I would of already done.
I just want to know if there is a way to piggyback them efficiently(MEGA > Leonardo OR Leonardo > MEGA), So I only need to use 1 USB cable. Keep in mind there is going to be data transmission both ways over serial and each board needs to be talked to or listened to.
Is there a way to just piggyback them off of one another that way I dont have to use 2 USB ports?, Assuming you can Send/Receive data over USB serial simultaneously.
Not sure what you are planning, but I run two arduinos to a USB hub then to a single USB port on a pc. I run two instances of the arduino IDE (one for each arduino) when testing communications between the two arduinos.
Hmm. I have no idea why a USB hub didnt come to my mind. I was trying to make things harder than they needed to be. I kinda liked the idea of tying them together though.
This is my first real arduino project, And feel free to slap me if I seem retarded.
I understand that a Leonardo can emulate keystrokes but I don't understand, from your description, why that is necessary, given that the Mega is talking to some PC software in any case.