NMEA2000 icon indicating copy to clipboard operation
NMEA2000 copied to clipboard

cstdint: No such file or directory #include <cstdint>

Open zeidda opened this issue 11 months ago • 13 comments

Hello, I am working on a project to using CANBed - Arduino CAN-BUS Development Kit (ATmega32U4 with MCP2515 and MCP2551) to read data from CAN BUS such as RPM and depend on that I want to give commands to my trim relays, I am have issue with my code when I run it, it shows this error cstdint: No such file or directory #include can someone please help ?

zeidda avatar Feb 27 '24 20:02 zeidda

cstdint is included in RingBuffer.h. You can change it to #include <stdint.h>. Seems that cstdint is not supported by AVR. On the other hand stdint.h is deprecated so have to think a bit best solution.

ttlappalainen avatar Feb 28 '24 04:02 ttlappalainen

Hello, thank you for replying. I think am having a problem with libraries to be included in my code, am using CANBed Kit as I mentioned, am trying to read RPM codes through serial monitor maybe, I need help in what libraries I can include to make this happen and maybe I can share my code to see what am missing.

zeidda avatar Mar 04 '24 16:03 zeidda

I prefer to forget that board: ● Flash memory: 32 KB ● SRAM: 2.5 KB

See library requirements https://ttlappalainen.github.io/NMEA2000/page_h_w_set_up.html#secTRecHW I have wrote that "So you should have at least 8 kB RAM in your processor"

Go to ESP32 or Teensy 4.x

ttlappalainen avatar Mar 04 '24 17:03 ttlappalainen

Thank you, Timo, I will order the ESP32, do you recommend can transceiver that work better for this board and, is there a link that can show me how the connection will be from the esp32 to CAN transceiver to NMEA 2000? And back to my main project there should no problem for me to read data and sending commands to relays using this library and this board?

zeidda avatar Mar 07 '24 13:03 zeidda

Read the document! Under https://ttlappalainen.github.io/NMEA2000/page_h_w_set_up.html there is description about transceivers and wheather you can use unisolated or must use isolated. Do not mix CAN transceiver and CAN controller. ESP32 has build in CAN controller and you need on transceiver.

With ESP32 one can do that and lot more.

ttlappalainen avatar Mar 07 '24 18:03 ttlappalainen

Hello Timo, I have received the NANO Arduino ESP32 today, I tried to run the data display 2 but am having compilation errors, I need help tracking down these errors please! I included two libraries NMEA2000master.zip and ESP32master.zip, I also uncommented the defines lines that work with esp32, and I also included the NMEA2000_esp32 library to the DataDisplay2.

Is this the process to compile the code into the Arduino Nano ESP32? Is there anything that I am missing?

Capture

zeidda avatar Mar 11 '24 20:03 zeidda

Arduino nano has the ESP32-S3 chip, you need this library https://github.com/jiauka/NMEA2000_esp32xx

Instead of the NMEA2000_esp32

jiauka avatar Mar 11 '24 20:03 jiauka

okay thank you I got the code uploaded with no error. now how can i see data? Do I need another software so be able to read data? Or will it show up on Arduino IDE serial monitor? Baud rate need to be changed?

zeidda avatar Mar 11 '24 21:03 zeidda

Check ActisenseListener example, everything you ask is there.

jiauka avatar Mar 11 '24 21:03 jiauka

Thank you for your quick reply, I tried to run the ActisenseListener example, and I am not able to read any data coming from NMEA2000 network, when I open NMEA2000 reader there os no data showing, below is my current connection diagram for esp32, iso1050, and the DB-9 connector, do you believe I have a connection issue? also, I noticed that I cant enable any option on NMEA2000 reader for TX and RX Capture

zeidda avatar Mar 12 '24 16:03 zeidda

Connect the gnd of the 5V to the nmea2000 it won't harm.

Also be sure that TX and RX at the EsP32 are properly configured as TWAI Rx & tx

jiauka avatar Mar 12 '24 17:03 jiauka

Thank you I found the error. using data display2 I was able to read data from NMEA2000 network.

although, when using actisense reader example i get undecrypted data as shown on the serial monitor picture below, do you know what can be causing this issue?

Capture

on actisense NMEA reader I don't see any data and I cant enable tx and rx PGNs

Captureq

zeidda avatar Mar 12 '24 19:03 zeidda

You are mixing things a bit.

  • DataDisplay2 is meant to show as example some bus data in clear text format on serial monitor. You should not use that output with Actisense Reader.
  • If you want to see data on Actisense Reader, you should use e.g., ActisenseListenerSender.
  • ActisenseListenerSender converts NMEA2000 bus data to Actisense format, which is their binary representation of bus data. It can have any byte and thats why it shows on serial monitor just mesh.
  • If you use Actisense Reader settings effects only to NGT-1. If you use ActisenseListenerSender, it reads and sends all messages.
  • If you do not see anything on Actisense Reader, either your device does not send anything, baudrate or format is wrong. ActisenseListenerSender sends right format.
  • With ActisenseListenerSender you can use my NMEA Simulator for sending data to the bus. It is also far more better bus data analyzer than Actisense Reader, but unfortunately show parsed data only on paid version.
  • NMEA2000 is not crypted.

ttlappalainen avatar Mar 13 '24 04:03 ttlappalainen