Atlas Scientific Ardiuno to Particle code issues

Have a look at this first and see how far you get with this
Porting from Arduino to Particle.io (Simplified-Hopefully)

After that we’ll be there to address more complicated matters.