
pw44
@pw44
Best posts made by pw44
-
RE: Gateway Uno R3 + W5100 Ethernet Shield for Uno not working.
Thank you for answering, and helping to solve. Having the radio module plugged, it worked.
How to define it as a dhcp client instead of setting a fixed ip address, having only the mac address defined?
Thx in advance!
-
RE: wait() with interrupt
@TRS-80 said in wait() with interrupt:
I can't help but make it complicated, I'm descended from Germans!
Aber das Traue ich dir.
-
RE: Two gateways and nodes
@mfalkvidd Thx for the reply. It makes sense.
-
NRF24L01+ and NRF24L01+PA-LNA problems - testing in progress
Hi all,
i found this link:
It seams to explain some of the problems i'm having.
Can anyone confirm this?
Thank you in advance.
Latest posts made by pw44
-
RE: Which pins should I use for status led on a wemos d1 mini gateway
@pw44 and so, my first assbled gateway looks like:
Now i will try a more robust version, with external antenna.
-
RE: Which pins should I use for status led on a wemos d1 mini gateway
@BearWithBeard exactly what i was looking for, the pin mapping for D1 MINI.
Thx!
-
RE: Which pins should I use for status led on a wemos d1 mini gateway
@mfalkvidd thx for answering.
i was looking for the correct mapping for:
#define MY_DEFAULT_ERR_LED_PIN D0 // Error led pin
#define MY_DEFAULT_RX_LED_PIN D3 // Receive led pin
#define MY_DEFAULT_TX_LED_PIN D4 // Transmit led pinthx to your hint, D0 =16, D3 = 0, D4 = 2.
So, i shall change to:
#define MY_DEFAULT_ERR_LED_PIN 16 // Error led pin
#define MY_DEFAULT_RX_LED_PIN 0 // Receive led pin
#define MY_DEFAULT_TX_LED_PIN 2 // Transmit led pin -
RE: Which pins should I use for status led on a wemos d1 mini gateway
@BearWithBeard could you please confirm the correct definitions for the pins?
#define MY_DEFAULT_ERR_LED_PIN 3 // D0 Error led pin
#define MY_DEFAULT_RX_LED_PIN 5 // D3 Receive led pin
#define MY_DEFAULT_TX_LED_PIN 4 // D4 Transmit led pinD1 = pin 1
D3 = pin 5
D4 = pin 4
D0 = pin 3is this correct?
thx in advance.
-
RE: Which pins should I use for status led on a wemos d1 mini gateway
@BearWithBeard said in Which pins should I use for status led on a wemos d1 mini gateway:
@pw44 No, this isn't a good idea. You should have all status LEDs in either source or sink configuration, or some LEDs will be inverted (lit by default, off when there is activity).
D3 and D4 must to be connected like this to not prevent the ESP from booting: GPIO - Resistor - LED cathode - LED anode - VCC. D0 should be connected equally, even if it doesn't matter for the ESP's functionality.
Besides that, if you don't use I2C, you should also be able to use D1 (GPIO5) and D2 (GPIO4) for status LEDs, inclusion mode button, etc.
Thank you so much for your answer. Helped me a lot.
-
RE: Which pins should I use for status led on a wemos d1 mini gateway
Just make sure to connect them to VCC, not GND. If either D3 or D4 are pulled low, the ESP won't boot.
So, D0 to led anode and led cathode to resistor to gnd, correct?
-
RE: Which pins should I use for status led on a wemos d1 mini gateway
@Danielo-RodrÃguez good question, i'm also looking for it.
I used D1 for include button.
#define MY_INCLUSION_MODE_BUTTON_PIN D1Tried
#define MY_DEFAULT_ERR_LED_PIN D0 // 3 // Error led pin
#define MY_DEFAULT_RX_LED_PIN D3 // 5 // Receive led pin
#define MY_DEFAULT_TX_LED_PIN D4 // 4 // Transmit led pinBut did not succeed.
-
RE: PIR with no interrupt - doubts.
got it working like, but there is problem: every time it's triggered, motion detected - motion ended and a second time motion detected - motion ended. not finding out why it's triggered a second time.
// Enable debug prints to serial monitor #define MY_DEBUG // Enable debug prints //#define MY_BAUD_RATE 9600 // Enable and select radio type attached #define MY_RADIO_RF24 #define MY_RF24_PA_LEVEL RF24_PA_HIGH // RF24_PA_MIN = -18dBm RF24_PA_LOW = -12dBm RF24_PA_HIGH = -6dBm RF24_PA_MAX = 0dBm //#define MY_RF24_CHANNEL (76) // RF channel for the sensor net, 0-125. // 0 => 2400 Mhz (RF24 channel 1) // 1 => 2401 Mhz (RF24 channel 2) // 76 => 2476 Mhz (RF24 channel 77) // 83 => 2483 Mhz (RF24 channel 84) // 124 => 2524 Mhz (RF24 channel 125) // 125 => 2525 Mhz (RF24 channel 126) //#define MY_RF24_BASE_RADIO_ID 0x00,0xFC,0xE1,0xA8,0xA8 //#define MY_RF24_DATARATE (RF24_250KBPS) // RF24_250KBPS for 250kbs RF24_1MBPS for 1Mbps RF24_2MBPS for 2Mbps. //#define MY_RF24_SPI_SPEED (2*1000000ul) // Define this if you need to run the SPI clock at a different frequency than the default. Default nRF24L01+ SPI speed, 2MHz should be safe for nRF24L01+ clones. //#define MY_DEBUG_VERBOSE_RF24 //#define MY_RADIO_RFM69 #include <MySensors.h> // Node and sketch information #define SKETCH_VER "1.0" // Sketch version #define SKETCH_NAME "Motion Sensor NoINterrupt" // Optional child sensor name #define CHILD_ID 1 // Id of the sensor child #define CHILD_NAME "Motion Sensor NI" // Optional child sensor name #define NODE_REPEATER false // Set true if a repeater node (i.e. always turned on) int PIRpin = 3; // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) int LEDpin = 13; int PIRstate = LOW; // we start, assuming no motion detected int value = 0; // variable for reading the pin status int PIRsold = 0; // Initialize motion message MyMessage msgPIR(CHILD_ID, V_TRIPPED); void setup() { pinMode(LEDpin, OUTPUT); // declare LED as output pinMode(PIRpin, INPUT); // declare sensor as input } void presentation() { sendSketchInfo(SKETCH_NAME, SKETCH_VER); present(CHILD_ID, S_MOTION); } void loop(){ value = digitalRead(PIRpin); // read input value if (value == HIGH) { // check if the input is HIGH digitalWrite(LEDpin, HIGH); // turn LED ON if (PIRstate == LOW) { Serial.println("Motion detected!"); send(msgPIR.set(1)); PIRstate = HIGH; } } else { digitalWrite(LEDpin, LOW); // turn LED OFF if (PIRstate == HIGH){ Serial.println("Motion ended!"); send(msgPIR.set(0)); PIRstate = LOW; } } }
Thx for the help.