# Calling function using the CLI not working

**URL:** <https://community.particle.io/t/calling-function-using-the-cli-not-working/34387>\
**Category:** Troubleshooting\
**Created:** [July 7, 2017, 4:09pm UTC](https://community.particle.io/t/calling-function-using-the-cli-not-working/34387 "2017-07-07T16:09:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meson777](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@Meson777](https://community.particle.io/u/Meson777)\
**Post date:** [July 7, 2017, 4:09pm UTC](https://community.particle.io/t/calling-function-using-the-cli-not-working/34387/1 "2017-07-07T16:09:53Z")

</div>

Hi  
I am new at particle and Photon.  
I got connected through Tinker with Android phone and I was able to play with digital and analog pins.  
I installed Windows CLI .  
I typed the command particle list.  
My device appear as connected with its name and is on line.  
But if want to switch on/off some pin with the function call like  
particle call my\_device\_name digitalwrite D7 , High the answer is 2 , which is correct  
but the LED doesn’t turn on.  
What could be the reason for that ?  
Thank you for any help

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [July 7, 2017, 4:54pm UTC](https://community.particle.io/t/calling-function-using-the-cli-not-working/34387/2 "2017-07-07T16:54:52Z")

</div>

> [@Meson777](#):
>
> particle call my\_device\_name digitalwrite D7 , High

The cal shouldn't have spaces in it, and it should be in capitals:

```plaintext
particle call my_device_name digitalwrite D7,HIGH

```

Give that a shot?

(The topic had absolutely nothing to do with the title, so I've changed it accordingly)

---

<div class="post-metadata">

**Author:** ![Meson777](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@Meson777](https://community.particle.io/u/Meson777)\
**Post date:** [July 7, 2017, 6:07pm UTC](https://community.particle.io/t/calling-function-using-the-cli-not-working/34387/3 "2017-07-07T18:07:51Z")

</div>

Thank you Moor7 for your answer.  
It was a typo when I wrote this post.  
You are high, should be in capitals but when I tried high was well written and nothing happened.  
What other reason can be the cause of it because my device is recognized with its ID and is online?  
Thank you for let me know about the post’s title.

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [July 7, 2017, 6:14pm UTC](https://community.particle.io/t/calling-function-using-the-cli-not-working/34387/4 "2017-07-07T18:14:20Z")

</div>

Could you show us an output of the CLI when you issue “particle list”?

---

<div class="post-metadata">

**Author:** ![Meson777](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@Meson777](https://community.particle.io/u/Meson777)\
**Post date:** [July 7, 2017, 9:31pm UTC](https://community.particle.io/t/calling-function-using-the-cli-not-working/34387/5 "2017-07-07T21:31:24Z")

</div>

![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/f/fd9c43df6eb2cafa9206d8fce967d19384a7b2c3.png)

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [July 7, 2017, 10:01pm UTC](https://community.particle.io/t/calling-function-using-the-cli-not-working/34387/6 "2017-07-07T22:01:20Z")

</div>

It still looks as though there’s a space between `D7 ,HIGH`, which shouldn’t be there.

Try copy&pasting `particle call Test_1 digitalwrite D7,HIGH`, and see if that works?

---

<div class="post-metadata">

**Author:** ![Meson777](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@Meson777](https://community.particle.io/u/Meson777)\
**Post date:** [July 8, 2017, 3:44pm UTC](https://community.particle.io/t/calling-function-using-the-cli-not-working/34387/7 "2017-07-08T15:44:50Z")

</div>

Hi Moors7

I worked out the issue.  
Thank you very much for your help
