Add a ds18b20

Please stop creating new topics about the same subject.
If you continue to do this your account will be suspended.

Pete.

is not same subject… That why i make new post

So is not important for the moment.

For add DS18B20 i’ve fisrt to understand how work virtual pin. I understand it read only, and is not physical.

But how V1 receive information ? I’ve to say, V1 information come from GPIO18 no ? I’m looking for more easy : blink LED widget on blynk application

I don’t really understand your question, and I don’t use NodeJS, but it’s pretty clear from your earlier example that when a widget that is attached to a virtual pin and the value of that widget changes, the result is obtained by your client device using this type of process…

And if your client wants to update a widget attached to a virtual pin then it uses this type of process…

I’m sure there are many other NodeJS virtual pin examples on the Blynk GitHub site and in the code samples from @Gunner that you could use to learn more.

Pete.

@PeteKnight can i open new post for ask about virtual PIN work with NodeJS ?

There is no point in opening a new post.
There are a VERY small number of users who use NodeJS and they will read this post if they are interested in contributing.

What EXACTLY is it that you want to know?

Pete.

Ok i give exemple. I have led widget on V1 on Blynk app. For lighting it needing information.
I think it’s something like if GPIO18 = 1 else V1 = 1.
Wich code i need to send ( from my raspberry ) this information ?

The example from [https://examples.blynk.cc] are out of date. so can’t find example of code. And no solutions for earn it…

I’m sorry to ask all question about raspberry…

I’m using esp8266 with blynk and it’s no problem with all exemples.

This makes no sense.
Which direction is the data flowing - from the app to the client, or client to app?

Pete.

from client to app

Pete.

Like this ok.

But with the widget LED on blynk app is activate by an input. Maybe i’m false but i think the widget blink when it receive signal. For exemple moition sensor

I have no idea what you mean by this.

Pete.

i try to explain by concrete :

I’ve motion sensor plugged on my Raspberry. I want receive notification on blynk app when motion sensor is detecteting something.

It’s possible to have a input like this ?

LED widget don’t work like this ( it’s on when it receive a input ? )

The Push Notification widget needs to be added to your app.
You then need to send a notify command from Blynk. How you do this from NodeJS I don’t know. Maybe if you you look through the Client library you’ll find the syntax, it maybe a search of the forum for “notify” and “NodeJS” then you might find something.

Whichever language you use, you need to be careful when using push notifications as you will run into problems if you send them too frequently.

Pete.

Ok for this i understand how it work.

I’m testing this : NodeJS Blynk - Code Examples for Basic Tasks (Work in Progress)

But when i move slider client disconnect with this :

pi@pizero:~/my-awesome-project $ sudo node index.js

    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/

  Give Blynk a Github star! => https://github.com/vshymanskyy/blynk-library-js

OnOff mode
Connecting to TCP: 127.0.0.1 8080
Connected
Authorized
2021-01-21 14:50:30 gpioPWM: gpio 18, bad dutycycle (1023)
/home/pi/my-awesome-project/node_modules/pigpio/pigpio.js:214
    pigpio.gpioPWM(this.gpio, +dutyCycle);
           ^

Error: pigpio error -8 in gpioPWM
    at Error (native)
    at Gpio.pwmWrite (/home/pi/my-awesome-project/node_modules/pigpio/pigpio.js:214:12)
    at .<anonymous> (/home/pi/my-awesome-project/index.js:20:18)
    at emitOne (events.js:96:13)
    at emit (events.js:188:7)
    at Blynk.onReceive (/opt/nodejs/lib/node_modules/blynk-library/blynk.js:510:27)
    at .<anonymous> (/opt/nodejs/lib/node_modules/blynk-library/blynk.js:607:50)
    at emitOne (events.js:96:13)
    at emit (events.js:188:7)
    at Socket.<anonymous> (/opt/nodejs/lib/node_modules/blynk-library/blynk-node.js:50:14)

Some idea for this issue ? ( it same for joystick widget )

:laughing: very unique!

Why don’t you use Python?

Haha i know, but i’ve just discover Blynk, if i can control it i gonna make more custom folder :stuck_out_tongue:

I don’t use python because wiringpi is out…

As I’ve already explained, WiringPi was used to allow C++ code to run on the RPI, not Python.

Pete.

Ho yep, but same problem there’s no more sketch exemple or i can’t find it

Exactly, which brings us back to the situation where someone of your experience would be better using a NodeMCU as the client, as there are many more examples of C++ code for Blynk, and the Blynk C++ library is much more mature and better documented.

Pete.