Spark Call digitalWrite -1

Hi,

I am new to SparkCore.

On my windows command prompt, I typed spark call Core_ID digitalWrite "D1,HIGH"

I get a response of “-1” instead of “1”.

When I typed "spark call Core_ID digitalWrite “D1,LOW”, I get “-1” too.

Does anyone know why?

Thanks.

Hi @Kane,

Grab a list of your cores with spark list, and make sure you include your core id or core name in that command:

spark call my_core_id_or_name digitalWrite "D7,HIGH"

Thanks,
David

Hi David,

I did type my Core_ID in command prompt. It didn’t show up in my post earlier because I used the brackets “, >”.

Thanks.

Hi @Kane,

Did you run a spark list ? Your core should show up with the digitalWrite / digitalRead / analogWrite / analogRead functions, if not then make sure you have Tinker loaded with spark flash my_core_id tinker

Thanks,
David

Hi @Dave,

When I type spark list, I get the following:

Core_Name Core_ID is online
Functions:
int digitalread String args>
int digitalwrite String args>
int analogread String args>
int analogwrite String args>

@Kane
There is no capital "W" in digitalWrite, they are case sensitive - as you see it in spark list

:slight_smile:

BTW - they do that just in case you weren't frustrated enough by the rest of the syntax!! :wink:

1 Like