Other Initial support for ESP32

Erel

B4X founder
Staff member
Licensed User
Longtime User
ESP32 is the next generation of ESP8266 chips.
It is a relatively new chip and the SDK is not very mature. There are many things that are not working yet, however it does look promising.



You need to follow these instructions: https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/boards_manager.md
Make sure that you are able to run a program (empty program is good enough) with the Arduino IDE before you try it with B4R.

I've encountered the following issues:

- Wire / I2C didn't work. Maybe a problem with the specific board that I've used.
- Network doesn't always connect.
- ServerSocket cannot accept a connection (client->available errno 9).
- EEPROM is not available.
- Pin.AnalogWrite not available.
- Client.Connected returns True although the connection has broken (this breaks rHttpUtils2).
 
Last edited:

positrom2

Active Member
Licensed User
Longtime User
The Arduino example sketch for testing the Adafruit 1306 oled compiles and can be uploaded to the ESP32, rather than the B4r Projekt which gives that error. But I might misunderstand your question. The B4r Projekt can't be compiled in the arduino ide.
Update:
I remember about the scr.ino. However, I can't find it. From a B4R compiling project, I find scr.ino.bin and ...elf in the B4R/Objects/bin folder, but not scr.ino, also not in the B4R folder and its subfolders.
From a non-compiling project like that for the ESP32 there is nothing like those (bin, elf, of course).
 
Last edited:
Upvote 0

positrom2

Active Member
Licensed User
Longtime User
As a follow-up to my post #22 I have some questions about the src.ino file.
Is that file only created when there is no error in the B4R compilation process?
Is that file deleted when the compilation was successful?
What is the file location?
After a successful compilation I did find a src.bin and a scr.elf file but no src.ino.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

positrom2

Active Member
Licensed User
Longtime User
Thank you.
It was a little bit confusing that the scr.ino file is keeping the same (old) date for any new compilation.
Coming back to the question in post #21:
The project displaying BMP280 data on an OLED 1306 display (listed in post #4) does not compile for the ESP32, both in B4R and in the Arduino IDE, whereas it runs on the ESP8266.
 
Last edited:
Upvote 0

rwblinn

Well-Known Member
Licensed User
Longtime User
FYI
The site Steps to install Arduino ESP32 support on Windows has been reworked.
Beside additional get tools being installed, there is also info on how to update to the latest code.

Have reinstalled completely to ensure latest tools etc.

Compiled successfully a simple LED Blink program on a ESP32 Dev Module.

(on my old test machine Toshiba Satellite, Windows Vista, Arduino IDE 1.8.0)
 
Last edited:
Upvote 0

positrom2

Active Member
Licensed User
Longtime User
I will leave it open for now.
THE OLED SSD1306 did not work with the ESP32 though it worked in combination with the ESP8266
and, from the Arduino IDE, with the ESP32.
Has there been some progress to get the OLED SSD1306 work with B4R with the ESP32?
 
Upvote 0

rbghongade

Active Member
Licensed User
Longtime User
Dear Friends,
Received the great Wemos Lolin32 board yesterday! The build is excellent , retaining the reputation of Wemos.
I updated Arduino IDE as per the instructions at: https://github.com/espressif/arduino-esp32/blob/master/doc/windows.md
1) Was able to blink the built-in LED (pin 5)
2) Scan for wi-fi networks
3) Connect to wi-fi as client
All using examples from Arduino IDE
Now the problem part:
Tried using B4R 1.80 ( it recognises the Lolin board)
But if I try to compile any code the error message I get is always the same:
B4X:
B4R version: 1.80
Parsing code.    (0.00s)
Compiling code.    (0.00s)
Building project    (0.04s)
Compiling & deploying Ino project (WEMOS LOLIN32 - COM32)    Error

sketch\B4RCore.cpp: In static member function 'static void B4R::BR::varArgsToObject(B4R::Object*, int, va_list)':
B4RCore.cpp:233: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
      o[index].wrapPointer((const __FlashStringHelper*)va_arg(arguments, void*));
                                                                               ^
sketch\B4RCore.cpp:5:10: note:   initializing argument 1 of 'B4R::Object* B4R::Object::wrapPointer(void*)'
  Object* Object::wrapPointer(void* p) {
          ^
exit status 1
invalid conversion from 'const void*' to 'void*' [-fpermissive]

Even tried using some inline C code but the error is always the same.
The board is really impressive and if we could get B4R to work with it , we would get the most powerful work-horse of IOT devices at our disposal!
PS: Was able to implement MQTT (again with Arduino IDE , sadly though!)
 
Last edited:
Upvote 0

swChef

Active Member
Licensed User
Longtime User

github link changed to
https://github.com/espressif/arduino-esp32/blob/master/docs/EXAMPLE_README_TEMPLATE.md
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…