I've been having some issues with my Arduino uno interfacing with my laptop, its a 2016 MacBook Pro so it has the USB-C plugs. I've been trying to run a program called ArdSimX, it allows the Arduino board to be used with a flight simulator to give inputs and output such as switches and lights. I've go the outputs to work so that if I hit a switch in the flight simulator an LED will go on and off. However the inputs from the board back into the flight simulator are not received. When I flip the switch the TX LED flashes indicating it wants to transfer something but the computer never gets the message. The guys who wrote the program are working on it from their end but I wanted to see if there was anything from my end that could be causing this. Am I missing some sort of driver? When I connect to the board I go through the cu.usbmodem but from what I've seen online its more commonly tty.usbserial. I've tried installing the FTDI drivers but that made no difference. Any help is much appreciated
Forget ArdSimX for the moment. Open the serial monitor application. Flip a switch. What does the serial monitor show? If nothing, then the Arduino is not sending data. If it shows something, then the problem is not with the Arduino or the PC. It is with ArdSimX.
Yes if I go into the serial monitor the TX LED flashes every few seconds and it prints out {|AR1}, but nothing different if I flip a switch
but nothing different if I flip a switch
Even though you didn't post this in the Programming section, we still need to see your code. A schematic would be useful, too.
There is a library that the program uses and there is a plugin that the flight simulator uses to connect to the Arduino.
/*
Base code for ArdSimX Library.
Download ARDsimX Library on the SimVimDesign website:
http://svglobe.com
*/
//================================
#include <ArdSimX_Interface.h> // -- ArdSimX library
//================================
//------------------------------------------
void setup() {
BoardNumber 1; // -- Assign Board Number here (0...9)
}
//------------------------------------------
void loop() {
ArdSimScan; // main loop - scan inputs and read incoming data for output
}
//===========================================
void ProgOut(byte id, float val) {
if (id==1) { }
else if (id==2 && val>0) { } //example
//.. etc., or use "case"
}
I can tell already that I am not going to like that library. Using a #define to make ArdSimScan a replacement for SimScan() just grates.
Is there some reason to not use white space to make the damned code readable?
I gave up on reading that mess. I'm sorry. Life is just too short to put up with that shit.