The arduino IDE builds a main function for you that initializes the hardware. Your providing your own main overrides it. Unless you really intended to do this and are aware of the consequences, better to stick to the model in sketch two.
The arduino IDE builds a main function for you that initializes the hardware. Your providing your own main overrides it. Unless you really intended to do this and are aware of the consequences, better to stick to the model in sketch two.