[SOLVED] TerminalNode and hardware

Hy, I’m having problems to sync the virtual pins. Let me explain: I wrote a Node script on my mac to stream from the terminal to a virtual pin a value that my arduino should read and then set a LED to that value.
My problem is: if I use the app to set the virtual pin the led fade like I wanted and my mac can stream the data from the app. If I use the script on my mac the value on the slider widget on the app works fine but my arduino doesn’t read this value. Is like the arduino can read only the value from the app and not from the terminal. Can you help me?

When you say “terminal” what terminal do you mean?

UNIX terminal. The problem is that the script on my mac send and receive data from the iPhone app but it doesn’t with Arduino (that send&receive data from the app).
It’s like arduino and node can’t speak!

And how do you send data from UNIX terminal?

the node script in the first image v1.write(param);
the app receives the data but arduino doesn’t

This scripts is supposed to be run on hardware and control hardware, in other words it is like sketch for arduino… If you want to control hardware via javascript you need to use Local Blynk server and this http/s API.

Uhm ok … but if I use Bridge feature it should work, should’t?

Bridge is for device -> device communication.

So there is no way to control a virtual pin from my mac without using a Local Blynk Server?

You may try http://cloud.blynk.cc:8080/your_token/pin/V5 for instance.

which is the URL to PUT data to a Virtual Pin?

See link on docs I posted above.

I tried the API’s console on your link.
I filled the auth_token and pin boxes and [“1”] in the body section and the response is “400 Requested pin not exists in app.”

SOLVED! Using http://cloud.blynk.cc:8080… instead of http://blynk-qa.cloudapp.net… (like your API says) it work’s.

Thanks :smile: