I'm building an arduino program on linux, using the following
ARDUINO_DIR = /usr/share/arduino BOARD_TAG = uno ARDUINO_PORT = /dev/ttyAMA0 ARDUINO_LIBS = Wire include /usr/share/arduino/Arduino.mk
Currently all of my code is spread among a dozen header files and a single
.ino file - it gets compiled and it runs properly when flashed. I know that's not correct though and I'm trying to split my code into the proper structure of source and header files but when I do and try to build it I get the following output:
In file included from gear.c:1:0: gear.h:19:1: error: unknown type name ‘byte’ byte GEAR = 3; ^
Which leads me to believe that the source file is getting compiled separately and does not know what a
byte is, which is supposedly defined somewhere within the arduino library.
What's the proper way to build my project with source files?