I need to convert 0 to 1023 analog signals to 1000 to 2000 microseconds digital signals from receiver side
I used it
I want to make a voltage divider Can I use IN4007 diodes for that
You need two resistors to make a voltage divider!
Pete.
what resistors do I need sir
Depends on the input voltage
the input voltage is 5 volts and i need 3.3 volts
Google is your friend!
Pete.
330k and 220k
I searched for it but every page had different answers
thanks sir
R1=220K
R2=330K
thanks
That’s because there are numerous combinations of suitable resistor values, and it depends on whether you are using the voltage divider to change a digital (logic level) signal from 5v to 3.3v (which isn’t usually necessary) or changing an analog output so that it is suitable for use with an ESP8266 or ESP32 (which both have different analog input voltage requirements).
Pete.
I use that because I have these resistors in stock
The output is 3v but that’s works fine
can i use 330ohm and 220ohm resistors
That’s works too
Thank god cuz i do not have 330kohm and 220kohm resistors
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include <Blynk.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "qmppE8kZmNhF8zTuaQdi__QnmIL-Dw1u";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "nitinpa";
char pass[] = "nitinpa1";
char BridgeAuth2[] = "ljF4YLcyFN9P6iVeze92GsffvGwSeb2J";
BlynkTimer timer;
WidgetBridge bridge1(V1);
WidgetBridge bridge2(V2);
void setup() {
Blynk.begin(auth, ssid, pass);
while (Blynk.connect() == false) {
}
timer.setInterval(1000L, Reading);
}
void loop()
{
Blynk.run();
timer.run();
}
void Reading(){
int A36 = analogRead(36);
int A39 = analogRead(39);
int A34 = analogRead(34);
int A35 = analogRead(35);
int A32 = digitalRead(32);
int A33 = digitalRead(33);
bridge2.virtualWrite(V1, A36);
bridge2.virtualWrite(V2, A39);
bridge2.virtualWrite(V3, A34);
bridge2.virtualWrite(V4, A35);
bridge2.virtualWrite(V5, A32);
bridge2.virtualWrite(V6, A33);
}
BLYNK_CONNECTED() {
bridge2.setAuthToken("BridgeAuth2");
sir will this code transmit data to every virtual pin in the code or just virtual pin 2