How to check Arduino version?

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

How to check Arduino version?

Postby OutOfLine » Thu Oct 15, 2020 7:14 am

I want my programs to show used software versions on startup.
I use esp_get_idf_version() to check ESP IDF version.
How do I check the arduino-esp32 version?

Or does each ESP IDF version also correspond to a corresponding arduino-esp32 version?

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

Re: How to check Arduino version?

Postby OutOfLine » Sat Oct 17, 2020 2:30 pm

After carefully editing a very detailed follow up the forum software crashed and I have to start all over again... It's not the first time I see this.
So I will post multiple shorter messagesnow , one after the other ;)

Background: The reason why I asked is that I have found a bug which I suspected to be in esp32-arduino:
If i do touchRead(32) and touchRead(33) the pins are swapped.
touchRead(32) reads pin 33 and vice versa.

The following issue seems to talk about the issue:
https://github.com/espressif/arduino-esp32/issues/3584
and there is also a fix for it:
https://github.com/espressif/arduino-es ... 1a63579378
The system I use here does not look like including the fix.

That leaves me with a couple of questions.

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

Re: How to check Arduino version?

Postby OutOfLine » Sat Oct 17, 2020 2:49 pm

* Is there a function or a macro that shows me the exact esp32-arduino version a program was compiled with?

I have tried to change the file by hand but took a wrong one, so
* Where is the used software stored in my file system?

The friendly compiler tells me

Code: Select all

Using core 'esp32' from platform in folder: /home/xxxx/.arduino15/packages/esp32/hardware/esp32/1.0.4
"arduino15" sounds unexpected, but ok, I'll try to edit ~/.arduino15/packages/esp32/hardware/esp32/1.0.4/cores/esp32/esp32-hal-gpio.c for a test next, but I would rather let git do the work, as there might be much more then this one issue.

* Is there something like a development branch or something that I can check?
What is the right way to install that?

The above mentioned issue is closed. As it is not working here I do assume I used a wrong software version. Or is there something wrong with the fix and I should reopen the issue?

Thanks a lot for any help

lbernstone
Posts: 828
Joined: Mon Jul 22, 2019 3:20 pm

Re: How to check Arduino version?

Postby lbernstone » Sat Oct 17, 2020 8:19 pm

https://github.com/espressif/arduino-es ... structions
Note, it is more likely that the paint on your board is incorrect rather than the pins being switched. AFAIK, the pin numbers are directly passed through to the touch API. Are the pins reversed if you try an analogRead on 32 & 33?

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

Re: How to check Arduino version?

Postby OutOfLine » Sun Oct 18, 2020 5:39 am

Following the link you gave "latest stable release" and "latest development release" are both v1.04 from october 19, but the fix was checked in december 19. This only adds to my confusion.

| Note, it is more likely that the paint on your board is incorrect rather than the pins being switched.
That was also my first reaction, but it shows on very different esp32 boards and only with
touchRead() while analogRead() is taking the right pin.

I have a function to see the values as a horizontal bar graph to check things like touch interrupt level or values from analog sensors.
So if I touch pin 32 and show analogRead(32) I see the mains hum flashing by on the serial monitor:

Code: Select all

*A32	0	0
*A32	1751	****************************
*A32	2642	******************************************
*A32	602	**********
*A32	496	********
*A32	406	*******
*A32	332	******
*A32	267	*****
*A32	210	****
*A32	158	***
*A32	109	**
*A32	68	**
*A32	39	*
*A32	10	*
*A32	0	0
*A32	1063	*****************
*A32	607	**********
*A32	635	**********
*A32	651	***********
*A32	1706	***************************
*A32	1408	***********************
*A32	1168	*******************
*A32	939	***************
*A32	701	***********
*A32	528	*********
*A32	386	*******
*A32	286	*****
*A32	206	****
*A32	144	***
*A32	94	**
*A32	55	*
*A32	31	*
*A32	9	*
*A32	0	0
while A33 stays quiet, as it should be.
Pins are *not* swapped with analogRead().

touchRead(32) does not show much activity when touching pin 32 but
touchRead(33) does (still touching pin 32).
Pins 32,33 *are* swapped for touchRead().

Code: Select all

*T33	75	*******************************
*T33	76	*******************************
*T33	75	*******************************
*T33	76	*******************************
*T33	75	*******************************
*T33	28	************        <<<< here I touch pin 32  (*not* pin 33)
*T33	5	***
*T33	6	***
*T33	7	***
*T33	5	***
*T33	4	**
*T33	5	***
*T33	4	**
*T33	5	***
*T33	5	***
*T33	4	**
*T33	5	***
*T33	4	**
*T33	5	***
*T33	15	*******               <<< pin 32 released
*T33	72	*****************************
*T33	17	*******
*T33	5	***
*T33	68	****************************
*T33	43	******************
*T33	71	*****************************
*T33	73	******************************
*T33	71	*****************************
*T33	70	*****************************
*T33	69	****************************
| AFAIK, the pin numbers are directly passed through to the touch API.
no, I don't think so. They get translated to the TOUCH_PAD_NUM. See https://docs.espressif.com/projects/esp ... h_pad.html

lbernstone
Posts: 828
Joined: Mon Jul 22, 2019 3:20 pm

Re: How to check Arduino version?

Postby lbernstone » Sun Oct 18, 2020 3:58 pm

The link above explains how to install the development repo. There are a number of newer branches in there. The esp32s2 branch includes a newer version of the touch hal. Test that branch and see if it fixes the issue. If not, post an issue in the repo.

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

Re: How to check Arduino version?

Postby OutOfLine » Sun May 02, 2021 8:24 am

I have some new problems that could be related to a possible bug in arduino-esp32 or the corresponding ESP IDF.
Before bothering people with issue reports missing version informations I want to ask the initial question of this thread again:

I want my programs to show used software versions on startup.
I use esp_get_idf_version() to check ESP IDF version.
How do I check the arduino-esp32 version?

btw: the problem is related to BluetoothSerial

lbernstone
Posts: 828
Joined: Mon Jul 22, 2019 3:20 pm

Re: How to check Arduino version?

Postby lbernstone » Sun May 02, 2021 2:13 pm

There is no function in arduino-esp32 to get the version before 2.0.
You can make a table to match idf version (the bit after the -g in esp_get_idf_version) to arduino versions. That info can be gleaned out of the release notes at https://github.com/espressif/arduino-esp32/releases.

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

Re: How to check Arduino version?

Postby OutOfLine » Sun May 02, 2021 6:13 pm

Thank you for the information. Would be nice to get this possibility in later versions.

lbernstone
Posts: 828
Joined: Mon Jul 22, 2019 3:20 pm

Re: How to check Arduino version?

Postby lbernstone » Sun May 02, 2021 7:14 pm

Both arduino-esp32 and esp-idf will have defined macros (and macro functions) for this going forward.
https://github.com/espressif/arduino-es ... _version.h
https://github.com/espressif/esp-idf/bl ... _version.h

Who is online

Users browsing this forum: No registered users and 152 guests