# How to add an class out of an library into Spark

**URL:** <https://community.particle.io/t/how-to-add-an-class-out-of-an-library-into-spark/2679>\
**Category:** Getting Started\
**Created:** [February 7, 2014, 2:29pm UTC](https://community.particle.io/t/how-to-add-an-class-out-of-an-library-into-spark/2679 "2014-02-07T14:29:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartjenniskens](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bartjenniskens/32/6408_2.png) [@bartjenniskens](https://community.particle.io/u/bartjenniskens)\
**Post date:** [February 7, 2014, 2:29pm UTC](https://community.particle.io/t/how-to-add-an-class-out-of-an-library-into-spark/2679/1 "2014-02-07T14:29:29Z")

</div>

Hi all,

I’m new to Spark and still a bit of a n00b. I did some work on my Arduino and know my way around the code but I just can’t figure this out myself. Your help is welcome!

Let me explain the situation:

I have a working code on my Arduino which controls a RX and TX 433Mhz module. With these modules I can control wireless power outlets and I have an wireless PIR sensor.  
The code uses two libraries which I normally call with this:  
"#include \< RemoteReceiver.h\>"  
"#include \< RemoteSwitch.h\>"

Since this is not the case with Spark Core. How do I get my libraries to work with my code.  
The library basically contains some classes.  
How do I place my class in the code? And where? Just copying the code from the library into Spark won’t work because it would say I haven’t declare the class. (the\_user\_app.cpp:514:3: error: ‘RemoteReceiver’ has not been declared)

Hope you folks can learn my how to use my class, which is normally inside the library, in Spark Core.

Thanks all!

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [February 7, 2014, 3:20pm UTC](https://community.particle.io/t/how-to-add-an-class-out-of-an-library-into-spark/2679/2 "2014-02-07T15:20:35Z")

</div>

Hi @bartjenniskens,

Sounds cool! We’re actually going to be rolling out multiple file support on the IDE very soon (today / early next week), so you can develop more closely to how you’re doing it now!

We’re also working on better library integration with the build site, so users can more easily pull in their favorite libraries as well.

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![bartjenniskens](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bartjenniskens/32/6408_2.png) [@bartjenniskens](https://community.particle.io/u/bartjenniskens)\
**Post date:** [February 7, 2014, 3:30pm UTC](https://community.particle.io/t/how-to-add-an-class-out-of-an-library-into-spark/2679/3 "2014-02-07T15:30:52Z")

</div>

Hi David,

Awesome! Thanks for the answer.  
When I have everything up and running I’ll post the code.

Regards,  
Bart

---

<div class="post-metadata">

**Author:** ![bartjenniskens](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bartjenniskens/32/6408_2.png) [@bartjenniskens](https://community.particle.io/u/bartjenniskens)\
**Post date:** [February 10, 2014, 12:28pm UTC](https://community.particle.io/t/how-to-add-an-class-out-of-an-library-into-spark/2679/4 "2014-02-10T12:28:25Z")

</div>

Hi @Dave,

I noticed the change today! Little bug maybe, some tabs are duplicated randomly;  
 ![](https://sea2.discourse-cdn.com/flex026/uploads/particle/581/e6d6707f4d5cf925.PNG)

regards,  
bart

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [February 10, 2014, 2:42pm UTC](https://community.particle.io/t/how-to-add-an-class-out-of-an-library-into-spark/2679/5 "2014-02-10T14:42:04Z")

</div>

Hi @bartjenniskens,

Thanks for the bug report, should be fixed soon I think. 😃

Thanks,  
David
