Help new library problems

You are using the scope resolution operator on your call to init(), in ambientCheck(), but init() is not declared a static function, so this call won't work.

The ambientCheck function will be called for an instance of the class. That same instance should be used to invoke the init() function, shouldn't it?