This seems like a silly problem at first, but i really don’t know what i’m doing Wrong.
I wrote an c application with clion, and because it was clear from the start, that it had to be Arduino-Compatible, i included a Driver file “Treiber.cpp” and “Treiber.h” as well as a header for the main block of code.
I’m currently in the process of fully porting the Programm to Arduino and ran into an issue while compiling: (Link to Code (Code also Attached below): https://github.com/Panther2804/tetris2_Arduino))
sketch/treiber.cpp: In function ‘int randomn(int, int)’:
treiber.cpp:6: error: ‘random’ was not declared in this scope
I really don’t know why this happens. random() is a standard Arduino routine, that shouldn’t be Throwing any Errors.
I think it has to do something with the fact that i’m using multiple files.
The same thing goes for: Serial stuff.
sketch/treiber.cpp: In function ‘void sbegin(int)’:
treiber.cpp:20: error: ‘Serial’ was not declared in this scope
Does anybody know why this happens and how to fix it?
Files Attached below.
tetris2_Arduino.zip (3.1 KB)