Looking for a working sketch for reading from MAX3232 RS232

I would like to read data from the Scalextric Sport RMS (Lapcounter hardware to connect a slotrace track to a computer) which uses an RS232 port and I'm looking for a sketch which reads from the RS232 port and writes to serial monitor.

I have:
an Arduino Mega board
a max3232 RS232 Serial port to ttl converter module DB9 connected to the arduino.
(https://nl.aliexpress.com/item/1005001521977149.html?spm=a2g0s.9042311.0.0.27424c4ddg22ZU)
The max3232 is connected to the arduino mega with RX2(17) to RXD and TX2(16) to TDX.
(VCC to 5V (maybe 3,3V is better?) Gnd to Gnd of course.)

Does anybody have a simple sketch I can use to check what kind of information the RMS sends over the RS232.

Thanks a lot.

Gerrit

A simple schematic would help, you would have seen your problem immediately. Also what baud are you operating and what are the settings, N,8,1 or what are they, this all has an effect. You also have your TX and RX crossed, Tx goes to Rx and Rx goes to Tx. Tx=transmit, Rx=receive. Transmitting to a transmitter only uses electrons and can only accomplish heating something up.

Don't know how to add a picture properly, but I found this scema using google. It is somewhere in this forum:

https://images.app.goo.gl/8VCP5XbZhtcG6f7U9

I ignored the part about the motor, because I don't want to control a motor. I just look at the MAX3232 connected to the Arduino and in the schema I found RX was connected to RXD and TX to TXD. I don't know if the schematic is correct.
What I am looking for is a simple example (sketch and schematic) on how to read data from a device using RS232 with a MAX3232 connected to my Arduino.

I don't know what information the Scalextric RMS is sending, all I know is that it will have to do with laps from the slotrace track. I want to find out what data it is sending over the RS232 port. When I connect the RMS to an old computer with a RS232 port it uses 9600 Baud, but it works on other rates as well.
Regards Gerrit

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.