Forum Replies Created

Viewing 15 posts - 466 through 480 (of 1,020 total)
  • Author
    Posts
  • in reply to: Cannot set SDA CLK on ESP8266 #22078
    Renzo Mischianti
    Keymaster

      Hi Joppnl,
      I tested the connection with this sketch

      
      #include "Arduino.h"
      #include "PCF8574.h"
      #define SDA D2 // D2=GPIO4
      #define SCL D3 // D3=GPIO0
      
      // Set i2c address
      PCF8574 pcf8574(0x38, SDA, SCL);
      
      void setup()
      {
      	Serial.begin(115200);
      
      	// Set pinMode to OUTPUT
      	pcf8574.pinMode(P0, INPUT);
      	pcf8574.pinMode(P1, INPUT_PULLUP);
      
      	pcf8574.pinMode(P5, OUTPUT);
      	pcf8574.pinMode(P6, OUTPUT, LOW);
      	pcf8574.pinMode(P7, OUTPUT);
      
      	pcf8574.begin();
      }
      
      bool startVal = HIGH;
      
      void loop()
      {
      //	pcf8574.digitalWrite(P0, HIGH);
      //	delay(1000);
      //	pcf8574.digitalWrite(P0, LOW);
      	byte val = pcf8574.digitalRead(P0);
      	Serial.print("PIN 0: ");
      	Serial.println(val);
      	val = pcf8574.digitalRead(P1);
      	Serial.print("PIN 1: ");
      	Serial.println(val);
      
      	pcf8574.digitalWrite(P7, startVal);
      	if (startVal==HIGH) {
      		startVal = LOW;
      	}else{
      		startVal = HIGH;
      	}
      	delay(3000);
      }
      
      

      It works correctly without any change.

      I think there is an issue with your code. Try to change the define like so:

      
      #define SDA D2 // D2=GPIO4
      #define SCL D3 // D3=GPIO0
      

      Bye Renzo

      Attachments:
      You must be logged in to view attached files.
      in reply to: Cannot set SDA CLK on ESP8266 #22069
      Renzo Mischianti
      Keymaster

        Hi Joppnl,
        other people tell me about that problem, for now, seems that a

        
          Wire.begin();   
        

        at the beginning of the setup function fix the problem.
        But I must investigate.

        Bye Renzo

        in reply to: No sucess on receiving sent data #22063
        Renzo Mischianti
        Keymaster

          Hi 1n5an1ac,
          as you can see in the table attached extracted from the datasheet, the limitation of the 9600 baud rate is applied only when you are programming the device.
          The transfer function works correctly.
          Bye Renzo

          Attachments:
          You must be logged in to view attached files.
          Renzo Mischianti
          Keymaster

            Thanks to you for helping to find the solution.
            Bye Renzo

            in reply to: No sucess on receiving sent data #22015
            Renzo Mischianti
            Keymaster

              Hi 1n5an1ac,
              Sorry, but I don’t know why but your topic was going on spam.
              But I’m happy that you have found the solution.
              Bye Renzo

              Renzo Mischianti
              Keymaster

                Hi Rodyeo,
                I check the 2.0.4 version of CameraWebServer, and I put on working with these changes.
                In the main CameraWebServer.ino I add these lines.

                
                const int pwmfreq = 50000;     // 50K pwm frequency
                const int pwmresolution = 9;   // duty cycle bit range
                ledcSetup(config.ledc_channel, pwmfreq, pwmresolution);  // configure LED PWM channel
                ledcAttachPin(4, config.ledc_channel);            // attach the GPIO pin to the channel
                

                after the setting of camera_config_t config; structure

                And in the file app_attpd.cpp after the include I add these lines:

                
                //
                // LED Illuminator
                //
                #define CONFIG_LED_ILLUMINATOR_ENABLED
                #define CONFIG_LED_LEDC_PIN 4
                #define CONFIG_LED_MAX_INTENSITY 255
                //#define CONFIG_LED_LEDC_LOW_SPEED_MODE
                // CONFIG_LED_LEDC_HIGH_SPEED_MODE is not set
                #define CONFIG_LED_LEDC_TIMER LEDC_TIMER_0
                #define CONFIG_LED_LEDC_CHANNEL LEDC_CHANNEL_0
                // end of LED Illuminator
                

                I have also attached the modified files.

                Bye Renzo

                Attachments:
                You must be logged in to view attached files.
                in reply to: Trouble with the Ebyte E32433T30D #21978
                Renzo Mischianti
                Keymaster

                  Hi moonman,
                  connect AUX also (without It, you can’t have real feedback from the device) and enable the DEBUG.

                  Check also the ampere sent to the device, the 1W module wants 700mAh or more.
                  Bye Renzo

                  in reply to: PCF8574-transistor base switch #21944
                  Renzo Mischianti
                  Keymaster

                    Hi Celeb10,
                    I think the transistor isn’t sufficient to control a 12v motor, you need more ampere, try to use a MOSFET.
                    Bye Renzo

                    in reply to: E22 Relay (repeater) Mode Using #21942
                    Renzo Mischianti
                    Keymaster

                      Hi Musti,
                      to use the repeater mode you must activate the relative flag on the device

                      
                              configuration.TRANSMISSION_MODE.enableRepeater = REPEATER_ENABLED;
                      

                      Then you must use ADDH and ADDL to specify from which NETID to which NETID you want to repeat the signal.

                      But now I think the schema is more simple to understand.

                      Bye Renzo

                      in reply to: E220 using ESP8266 #21925
                      Renzo Mischianti
                      Keymaster

                        Hi Warleysr,
                        I don’t know because you have this behavior.
                        Try to remove completely the resistor.
                        Bye Renzo

                        in reply to: Mega 2560 and LoRa e22 EByte problems #21924
                        Renzo Mischianti
                        Keymaster

                          Hi Neuron,
                          Have you already seen the relative articles and tutorials?
                          If not, go here.
                          Bye Renzo

                          in reply to: Maximum current through esp32 with 30dB module #21913
                          Renzo Mischianti
                          Keymaster

                            Ahh!! I forget to add this tip, E22 has a repeater function and can be very useful in a situation like yours.
                            Bye Renzo

                            in reply to: Maximum current through esp32 with 30dB module #21893
                            Renzo Mischianti
                            Keymaster

                              Hi bepaald,
                              If you select the 5v pin, It absorbs energy directly from the USB, so if the USB has sufficient ampere, It works correctly.

                              To avoid the obstacles, there are 2 important factors, first power and second the frequency. A small frequency is able to avoid the obstacles better.
                              But If the structure to avoid is too big, It’s very difficult to have good efficiency.

                              The PCB is fully compatible, but some LoRa device has a big form factor and can be difficult to put in.
                              Bye Renzo

                              in reply to: Compatible with stm32duino #21891
                              Renzo Mischianti
                              Keymaster

                                Hi Grzegorz,
                                It’s strange in the framework the default frequency is already 100000
                                but I think It’s sufficient tu put

                                
                                Wire.setClock(100000);
                                

                                before the pcf8574.begin

                                Bye Renzo

                                in reply to: E220 using ESP8266 #21890
                                Renzo Mischianti
                                Keymaster

                                  Hi warleysr,
                                  a similar problem also here (resolved with the properly use of library).

                                  Try to add an external power supply and check if M0 and M1 go HIGH correctly.

                                  Bye Renzo

                                Viewing 15 posts - 466 through 480 (of 1,020 total)