removed reliance on Arduino.h since the only thing used form it was the definition of NULL and added a definition for NULL
added toArray() function