How do I write code for my ASR-1 module?

You don’t. ASR-1 has generic firmware that implements the Afero secure protocol. The only thing that ever changes on ASR-1 is the profile. You can define a profile to use either the built-in IO pins or add application-specific attributes that can be modified by an external MCU. All attributes are available from the Afero Cloud and the Afero mobile applications.