new to esp32

donreypirata
Posts: 4
Joined: Tue Aug 20, 2024 9:57 pm

new to esp32

Postby donreypirata » Tue Aug 20, 2024 10:07 pm

Hi, I'm new to esp32, I got the esp32 s-3 devout c-1 board and the esp32-c3 devout m1, but I can't identify which are the i2c pins in the s-3, in the c3 are clearly identified in the documentation, all help will be appreciated.

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: new to esp32

Postby ESP_Sprite » Wed Aug 21, 2024 2:44 am

ESP32 chips don't have dedicated pins for that; you can select any of them to be used for I2C. (Note that some SDKs, like Arduino, do use default pins if you don't specify any, but that's an SDK thing, not something that is enforced in hardware.)

donreypirata
Posts: 4
Joined: Tue Aug 20, 2024 9:57 pm

Re: new to esp32

Postby donreypirata » Wed Aug 21, 2024 2:10 pm

thank you, I didn't know that, any instruction on how to do that?

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: new to esp32

Postby ESP_Sprite » Thu Aug 22, 2024 12:49 am

Depends on the SDK. Which one are you using?

charansai
Posts: 1
Joined: Wed Aug 21, 2024 5:23 am

Re: new to esp32

Postby charansai » Thu Aug 22, 2024 11:45 am

hii i am getting this error while compiling can anyone can help me...

Code: Select all

else if(subMenuPage==2){
      lcd.setCursor(0,0);lcd.print("CHARGING CURRENT");
      if(setMenuPage==1){lcd.setCursor(0,1);lcd.print(" >");}
      else{lcd.setCursor(0,1);lcd.print("= ");}
      lcd.setCursor(2,1);lcd.print(currentCharging,2);lcd.print("A");  
      lcd.print("                ");  

      //SET MENU - FLOATTYPE
      if(setMenuPage==0){floatTemp = currentCharging;}
      else{
        if(digitalRead(buttonBack)==1){while(digitalRead(buttonBack)==1){}currentCharging = floatTemp;setMenuPage=0;} 
        if(digitalRead(buttonSelect)==1){while(digitalRead(buttonSelect)==1){}saveSettings();setMenuPage=0;}     
        currentMenuSetMillis = millis();
        if(digitalRead(buttonRight)==1){                                                  //Right button press (increments setting values)
          while(digitalRead(buttonRight)==1){
            if(millis()-currentMenuSetMillis>longPressTime){                              //Long Press     
              currentCharging += 1.00;                                                    //Increment by 1
              currentCharging = constrain(currentCharging,0.0,cOutSystemMax);             //Limit settings values to a range
              lcd.setCursor(2,1);lcd.print(currentCharging,2);delay(longPressInterval);   //Display settings data                               
            }
            else{                                                                         //Short Press  
              currentCharging += 0.01;                                                    //Increment by 0.01
              currentCharging = constrain(currentCharging,0.0,cOutSystemMax);             //Limit settings values to a range
              lcd.setCursor(2,1);lcd.print(currentCharging,2);delay(shortPressInterval);  //Display settings data                            
            }  
            lcd.print("A   ");                                                            //Display unit
          } 
        }
        else if(digitalRead(buttonLeft)==1){                                              //Left button press (decrements setting values)
          while(digitalRead(buttonLeft)==1){
            if(millis()-currentMenuSetMillis>longPressTime){                              //Long Press     
              currentCharging -= 1.00;                                                    //Increment by 1
              currentCharging = constrain(currentCharging,0.0,cOutSystemMax);             //Limit settings values to a range
              lcd.setCursor(2,1);lcd.print(currentCharging,2);delay(longPressInterval);   //Display settings data                               
            }
            else{                                                                         //Short Press  
              currentCharging -= 0.01;                                                    //Increment by 0.01
              currentCharging =  constrain(currentCharging,0.0,cOutSystemMax);            //Limit settings values to a range
              lcd.setCursor(2,1);lcd.print(currentCharging,2);delay(shortPressInterval);  //Display settings data                                      
            } 
            lcd.print("A   ");                                                            //Display unit
          } 
        }
      } 
    }
Error: ...8_LCD_Menu:377:1: error: insn does not satisfy its constraints:
377 | }
| ^
(insn 11 2651 1185 127 (set (reg:SF 19 f0 [orig:127 _95 ] [127])
(mem/u/c:SF (symbol_ref/u:SI ("*.LC357") [flags 0x2]) [0 S4 A32])) "C:\Users\chara\Downloads\CODE_MPPT_ESP32_V1.2.1-20240819T055256Z-001\CODE_MPPT_ESP32_V1.2.1\8_LCD_Menu.ino":205:33 49 {movsf_internal}
(expr_list:REG_EQUAL (const_double:SF 0.0 [0x0.0p+0])
(nil)))
during RTL pass: postreload
C:\Users\chara\Downloads\CODE_MPPT_ESP32_V1.2.1-20240819T055256Z-001\CODE_MPPT_ESP32_V1.2.1\8_LCD_Menu.ino:377:1: internal compiler error: in extract_constrain_insn, at recog.cc:2692
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
exit status 1
insn does not satisfy its constraints: ...'''
WhatsApp Image 2024-08-21 at 2.14.12 PM.jpeg
Error image
WhatsApp Image 2024-08-21 at 2.14.12 PM.jpeg (63.14 KiB) Viewed 1567 times

donreypirata
Posts: 4
Joined: Tue Aug 20, 2024 9:57 pm

Re: new to esp32

Postby donreypirata » Thu Aug 22, 2024 4:08 pm

im using the Arduino ide to program the boards

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: new to esp32

Postby ESP_Sprite » Thu Aug 22, 2024 11:53 pm

charansai wrote:
Thu Aug 22, 2024 11:45 am
Please post that in a separate topic.
donreypirata wrote:im using the Arduino ide to program the boards
You can set the GPIOs when initializing the TwoWire object. For e.g.GPIO 12 and 13, you would do something like

Code: Select all

TwoWire I2Cbus = TwoWire(0);
I2Cbus.begin(12, 13, 100000); 
See here for some more examples.

donreypirata
Posts: 4
Joined: Tue Aug 20, 2024 9:57 pm

Re: new to esp32

Postby donreypirata » Fri Aug 23, 2024 10:31 pm

great, thank you very much, I will try it this weekend, really appreciate your help

Who is online

Users browsing this forum: No registered users and 51 guests