I have tried by changing values of pins by passing strings but it not worked plz help me

Gunner I have tried by changing values of pins by passing strings but it not worked plz help me
only this task left for me of writing value of pins“0”"[“0”]"
i have passed in many ways
and my arduino sketch is this:

should i make any modifications regarding to write pin values plz gunner if i write and update values of pin my task will complete

@shama Please do not create 2nd accounts and use it to post the same issue on multiple topics… I have removed all of them and the unnecessary 2nd account.

As for your new issue, I moved tit into a new topic.

First you have not formatted your code as required… Please repost your code properly.

Blynk - FTFC

Secondly, if you would search and read other API related topics and look at the examples on the API document page you might see that you are using quotes around your values that are not needed.

Please read the directions before posting any more unformatted code!

So we should not use D2,D3 pins? what are PWM pins mean? actually i used 4 pins D3,D5,D6,D7 in blynk app and connected to nodemcu but when i try to execute same pins in browser it is not working

Gunner i ddidn’t get u as u mentioned above to repost your code properly so i copy paste my code .what mistake i done?

@shama I have moved your post above from another 2 year old topic… assid from being an old topic, it was irrelevant to your issue, which is basically not reading other posts about how to use proper API syntax :wink:

Do not use Dx silkscreened labeling for pins, use the proper GPIO designation for a pin.

Read the links above… use the proper triple backticks before and after your code when pasting it in this forum.

1 Like

Plz post one example i cant getting u ,i mean GPIO pins how to parse string in url?

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] ="80d3631030d247f0b4250eecc2410849";

IPAddress ip(192,168,1,39);
IPAddress gateway(192,168,1,1);
IPAddress subnet(255,255,255,0);

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "S.R.Electronics Lab";
char pass[] = "abcdef0123456";

void setup()
  Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,9),8080);

void loop()
1 Like

This will turn on a physical LED to full intensity on digital PWM pin #9 on my Arduino… using Local Server.

Google for pinouts of whatever board you are using… look for the standard GPIO/Arduino pin designations

For example on a Wemos D1 Mini

1 Like

In above line u used value = 255? i mean to ON/OFF values we use ‘0’ or ‘1’ na?

update ‘6’ means u used D12 pin right?

I mean iam using this board

so to update D,D5,D6,D7 pins i should use GPIO pin values na like this below:‘0’
The above line is to update D3 pin to ON it ,is this true?

I was using a PWM pin and an Arduino, thus my choices of values and pin numbers…

Your choices will differ depending on what you want to do and what board you use.

Why are you still using quotes or apostrophes around your value?

apoz for the Hijack, but I guess this will help the OP as well. I’ve never completely gotten my around thid but is this assumptions correct: ?

updates gpio pin 6

updates virtual pin 6

updates digital pin D6 (depending on device compilation, e.g. for Wemos D6 = gpio 12)

Once you fix the quotes, then yes… sorta… but what you are actually doing is setting pin 0 (D3) LOW or OFF (well OK, the LED may be wired to trigger ON when that pin is LOW)

@Gunner: we posted at the same time, can you have a look at my post?

EDIT - OK, I am also confused… I was sure I had my Mega working with just using pin 6… but now I need to use D6 (different than ESP silkscreening)… and now it is not responding with PWM… so I guess I just don’t know for sure :blush:

Of course I also normally never use direct pin manipulation anyhow… instead I use vPins… so all I can say is use Trial and error, then go with whatever works :stuck_out_tongue:

I really don’t use the API myself… only when assisting others do I dig into how it works on their behalf… but I think I need to use it more myself so I have an even better understanding.

I want to ON and OFF pin values so iam using 0 and 1 values

Well, just keep trying different values and syntax… that’s all I was doing on your behalf :stuck_out_tongue_winking_eye: And may not be correct on some of my suggested syntax as I was not using an ESP in those tests.

But I have other things to focus on than learning API syntax right now, so I have to leave you to figure this out on your own for now.

1 Like
i executed this in browser but it showing wrong pin format.

Actually i connected my nodemcu boards to four bulbs of digital pins of D3,D5,D6,D7 and i want to update it by using 0 and 1 values for ON and OFF .above line i executed by placing 2 because D4 value of GPIO is 2 na so i placed it even it not executing

If you wire your LEDs between the pin and ground, then 1 will be HIGH or ON, and 0 will be LOW or OFF

1 Like