budulinek / arduino-modbus-rtu-tcp-gateway

Arduino-based Modbus RTU to Modbus TCP/UDP gateway with web interface. Allows you to connect Modbus RTU slaves (such as sensors, energy meters, HVAC devices) to Modbus TCP/UDP masters (such as home automation systems). You can adjust settings through web interface.
GNU General Public License v3.0
165 stars 48 forks source link

error message 'CreateTrulyRandomSeed' was not declared in this scope #9

Closed mind-smith closed 2 years ago

mind-smith commented 2 years ago

Hi, i'm new with Arduino and also with Git, so i hope this is the right way to ask a question.

I copy your code into Arduino Software (Version 1.8.16 Linux) What made i wrong? When i try to upload the code i get this errors:

Arduino: 1.8.16 (Linux), Board: "Arduino Nano, ATmega328P"

/home/toni/test1.ino:122:0: warning: "UDP_TX_PACKET_MAX_SIZE" redefined

define UDP_TX_PACKET_MAX_SIZE modbusSize

In file included from /home/toni/test1.ino:40:0: /home/toni/libraries/Ethernet/src/Ethernet.h:150:0: note: this is the location of the previous definition

define UDP_TX_PACKET_MAX_SIZE 24

/home/toni/test1.ino: In function 'void setup()': test1:220:3: error: 'CreateTrulyRandomSeed' was not declared in this scope CreateTrulyRandomSeed(); ^~~~~ test1:230:5: error: 'generateMac' was not declared in this scope generateMac(); ^~~ test1:235:3: error: 'startSerial' was not declared in this scope startSerial(); ^~~ /home/toni/test1.ino:235:3: note: suggested alternative: 'Serial' startSerial(); ^~~ Serial test1:236:3: error: 'startEthernet' was not declared in this scope startEthernet(); ^~~~~ /home/toni/test1.ino:236:3: note: suggested alternative: 'Ethernet' startEthernet(); ^~~~~ Ethernet /home/toni/test1.ino: In function 'void loop()': test1:244:3: error: 'recvUdp' was not declared in this scope recvUdp(); ^~~ test1:245:3: error: 'recvTcp' was not declared in this scope recvTcp(); ^~~ test1:246:3: error: 'processRequests' was not declared in this scope processRequests(); ^~~~~~~ test1:249:3: error: 'sendSerial' was not declared in this scope sendSerial(); ^~~~~~ /home/toni/test1.ino:249:3: note: suggested alternative: 'Serial' sendSerial(); ^~~~~~ Serial test1:250:3: error: 'recvSerial' was not declared in this scope recvSerial(); ^~~~~~ /home/toni/test1.ino:250:3: note: suggested alternative: 'Serial' recvSerial(); ^~~~~~ Serial test1:253:3: error: 'recvWeb' was not declared in this scope recvWeb(); ^~~ test1:254:3: error: 'maintainCounters' was not declared in this scope maintainCounters(); // maintain counters and synchronize their reset to zero when they overflow ^~~~ /home/toni/test1.ino:254:3: note: suggested alternative: 'scanCounter' maintainCounters(); // maintain counters and synchronize their reset to zero when they overflow ^~~~ scanCounter exit status 1 'CreateTrulyRandomSeed' was not declared in this scope

budulinek commented 2 years ago

Hi, the first warning /home/toni/test1.ino:122:0: warning: "UDP_TX_PACKET_MAX_SIZE" redefined

is innocent, just ignore it.

Then you get errors, because the remaining INO files are missing. You need to download all INO files from github and put them in one folder.

Or you can git clone the repo to your computer.