# Set. Spark.variable()?

**URL:** <https://community.particle.io/t/set-spark-variable/4936>\
**Category:** Cloud\
**Created:** [June 8, 2014, 2:38pm UTC](https://community.particle.io/t/set-spark-variable/4936 "2014-06-08T14:38:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [June 8, 2014, 2:38pm UTC](https://community.particle.io/t/set-spark-variable/4936/1 "2014-06-08T14:38:58Z")

</div>

I was looking at a project where the requirement is to use a Web App and change timings of a pump.

How should i approach the problem to “send” data instead of GET `Spark.Variable` or `Spark.Function` to hard code the possible commands?

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [June 8, 2014, 4:40pm UTC](https://community.particle.io/t/set-spark-variable/4936/2 "2014-06-08T16:40:28Z")

</div>

HI @kennethlimcp

I like the approach I used here:

> **[Tutorial: Spark Variable and Function on One Web Page](https://community.particle.io/t/tutorial-spark-variable-and-function-on-one-web-page/4181)**
>
> Let’s say you have a Spark core with both a Spark variable and a Spark function. In my case, I have the world’s simplest servo control sketch, using the nice miniature servo in the Spark Maker Kit. Using these parts, we will build a servo that you...

Spark.functions are set methods and Spark.variables are get methods.

The example here is a little weird since you want to essentially continuously get the core value. If the pumps are those beautiful peristaltic dosing pumps in another thread–I am sorry I haven’t had time to work on that this week!

---

<div class="post-metadata">

**Author:** ![TechnoX](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/technox/32/12880_2.png) [@TechnoX](https://community.particle.io/u/TechnoX)\
**Post date:** [June 25, 2014, 12:14pm UTC](https://community.particle.io/t/set-spark-variable/4936/3 "2014-06-25T12:14:48Z")

</div>

Hi!

**Intro:**

I have just started to work on the spark core and have the same problem. I’m working on a system where the spark should send SMS (with a SMS shield). However the user should be able to write different messages at a web-interface and configure when each message should be sent (using sensor values).

**Problem:**

The problem I’m facing is that it is impossible to send more than a 64 bytes long string as a parameter to the Spark.Funcion(). And it seems impossible to write a value to a Spark.variable() from outside (i.e. read value in the Spark core and write it elsewhere). At least haven’t found anything about howto write to a variable in the documentation.

\*\*Question: \*\*

Do someone has any ideas of how I can send 180-chars to the spark core (and preferable also some more config-data along the text message)?

Best Regards,  
TechnoX
