Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use HELTEC WiFi Kit 32 #112

Open
mikekgr opened this issue Apr 29, 2018 · 24 comments

Comments

@mikekgr
Copy link

commented Apr 29, 2018

Dear Sirs,
I tried but unsuccessfully to work the HELTEC WiFi Kit 32 dev board with the ESP32-Radio.
For your info, the attached pdf shows all the pins of this dev board, also the occupied pins regarding the I2C OLED ( that now supported in the ESP32-Radio thanks to Mr. @Edzelf with his recent inclusion ).
If someone of you have this dev board working, or can suggest me what to do please send me a note.
All of my tries has always continious reset to ESP32...
Thanks and Best Regards,
Mike Kranidis
HELTEC WIFI_Kit_32-Diagram.pdf

@Edzelf

This comment has been minimized.

Copy link
Owner

commented Apr 29, 2018

First, try to run the radio software without anything attached (or configured) to the Heltec board. If it does not crash, add the VS1063 and finally the OLED. Remember to first run radio-init, so you can check the WIFi.

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 29, 2018

Dear @Edzelf ,
what I already tried is to put the correct I2C pins OLED_scl=15, OLED_sda=4, OLED_rst=16.
I successfully compiled then the "main" ino file ESP32_radio.ino and then I did power on/off to the HELTEC dev board. Looking at the serial port, it started and after a few seconds do reset again and again.
I am not sure regarding your suggestion: " Remember to first run radio-init, so you can check the WIFi. ".
What is that?
Again thanks and Best Regards,
Mike Kranidis

I run first: Esp32_radio_init.ino but it did not helps. See:

D: Starting ESP32-radio running on CPU 1 at 240 MHz. Version Wed, 25 Apr 2018 14:45:00 GMT. Free memory 171084
D: Partition nvs found, 20480 bytes
D: Read 31 keys from NVS
D: pin_ir set to -1
D: pin_enc_clk set to -1
D: pin_enc_dt set to -1
D: pin_enc_sw set to -1
D: pin_tft_cs set to -1
D: pin_tft_dc set to -1
D: pin_tft_scl set to 15
D: pin_tft_sda set to 4
D: pin_sd_cs set to -1
D: pin_vs_cs set to 5
D: pin_vs_dcs set to 17
D: pin_vs_dreq set to 4
D: pin_shutdown set to -1
D: pin_spi_sck set to 18
D: pin_spi_miso set to 19
D: pin_spi_mosi set to 23
D: GPIO0 is HIGH
D: GPIO2 is HIGH
D: GPIO4 is HIGH
D: GPIO5 is HIGH
D: GPIO12 is HIGH
D: GPIO13 is HIGH
D: GPIO14 is HIGH
D: GPIO15 is HIGH
D: GPIO16 is HIGH
D: GPIO17 is HIGH
D: GPIO18 is HIGH
D: GPIO19 is HIGH
D: GPIO21 is HIGH
D: GPIO22 is HIGH
D: GPIO23 is HIGH
D: GPIO25 is HIGH
D: GPIO26 is HIGH
D: GPIO27 is HIGH
D: GPIO32 is HIGH
D: GPIO33 is HIGH
D: GPIO34 is LOW, probably no PULL-UP
D: GPIO35 is LOW, probably no PULL-UP
D: gpio_00 will execute uppreset = 1
D: gpio_12 will execute upvolume = 2
D: gpio_13 will execute downvolume = 2
D: Start display
D: Init TFT 4 15
D: Create list with acceptable WiFi networks
Guru Meditation Error: Core 1 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 1 register dump:
PC : 0x4008c90d PS : 0x00060033 A0 : 0x4008dd93 A1 : 0x3ffd6b30
A2 : 0x00050023 A3 : 0x00000001 A4 : 0x3ffc8a74 A5 : 0x3ffc8c34
A6 : 0x00000001 A7 : 0x3ffc8c68 A8 : 0x00000016 A9 : 0x00000002
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x3ffc8c34 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000001 SAR : 0x00000013 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000048 LBEG : 0x40001609 LEND : 0x4000160d LCOUNT : 0x00000000

Backtrace: 0x4008c90d:0x3ffd6b30 0x4008dd90:0x3ffd6b50 0x4008dd46:0x4008bc90

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:812
load:0x40078000,len:0
load:0x40078000,len:11572
entry 0x40078a5c

D: Starting ESP32-radio running on CPU 1 at 240 MHz. Version Wed, 25 Apr 2018 14:45:00 GMT. Free memory 171084
D: Partition nvs found, 20480 bytes
D: Read 31 keys from NVS
D: pin_ir set to -1
D: pin_enc_clk set to -1
D: pin_enc_dt set to -1
D: pin_enc_sw set to -1
D: pin_tft_cs set to -1
D: pin_tft_dc set to -1
D: pin_tft_scl set to 15
D: pin_tft_sda set to 4
D: pin_sd_cs set to -1
D: pin_vs_cs set to 5
D: pin_vs_dcs set to 17
D: pin_vs_dreq set to 4
D: pin_shutdown set to -1
D: pin_spi_sck set to 18
D: pin_spi_miso set to 19
D: pin_spi_mosi set to 23
D: GPIO0 is HIGH
D: GPIO2 is HIGH
D: GPIO4 is HIGH
D: GPIO5 is HIGH
D: GPIO12 is HIGH
D: GPIO13 is HIGH
D: GPIO14 is HIGH
D: GPIO15 is HIGH
D: GPIO16 is HIGH
D: GPIO17 is HIGH
D: GPIO18 is LOW, probably no PULL-UP
D: GPIO19 is HIGH
D: GPIO21 is HIGH
D: GPIO22 is HIGH
D: GPIO23 is LOW, probably no PULL-UP
D: GPIO25 is HIGH
D: GPIO26 is HIGH
D: GPIO27 is HIGH
D: GPIO32 is HIGH
D: GPIO33 is HIGH
D: GPIO34 is LOW, probably no PULL-UP
D: GPIO35 is LOW, probably no PULL-UP
D: gpio_00 will execute uppreset = 1
D: gpio_12 will execute upvolume = 2
D: gpio_13 will execute downvolume = 2
D: Start display
D: Init TFT 4 15
D: Create list with acceptable WiFi networks
Guru Meditation Error: Core 1 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 1 register dump:
PC : 0x4008c90d PS : 0x00060033 A0 : 0x4008dd93 A1 : 0x3ffd6b30
A2 : 0x00050023 A3 : 0x00000001 A4 : 0x3ffc8a74 A5 : 0x3ffc8c34
A6 : 0x00000001 A7 : 0x3ffc8c68 A8 : 0x00000016 A9 : 0x00000002
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x3ffc8c34 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000001 SAR : 0x00000013 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000048 LBEG : 0x40001609 LEND : 0x4000160d LCOUNT : 0x00000000

Backtrace: 0x4008c90d:0x3ffd6b30 0x4008dd90:0x3ffd6b50 0x4008dd46:0x4008bc90

Rebooting...

@Edzelf

This comment has been minimized.

Copy link
Owner

commented Apr 30, 2018

For radio_init see the documentation: "An extra sketch "Esp32_radio_init" is supplied as an alternative to initialize the preferences (in Non-Voltile Storage of the ESP32). Just change lines 39 and 40 (the specs for WiFi networks) to match your network(s).
Upload and run the sketch once and then load the ESP32-Radio."

@Edzelf

This comment has been minimized.

Copy link
Owner

commented Apr 30, 2018

I also have a Heltec board. I tried it now and it keeps rebooting. I will see what's wronfg with this board.

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

Dear @Edzelf ,
yes I did, I fount Esp32_radio_init.ino inside the subdirectory tools and I loaded to Arduino IDE. Then after changed the lines 39,40:
preferences.putString ( "wifi_00", "myHomeWiFi/12345678" ) | preferences.putString ( "wifi_01", "SecondWiFi/12345678" ) |
I compiled and sent to ESP32. At the serial I took "ESP32_radio_init completed...".
Then I loaded the Esp32_radio.ino to Arduino IDE and the result is above, keep resetting...
Thanks

@Edzelf

This comment has been minimized.

Copy link
Owner

commented Apr 30, 2018

The program crashed when no IR was configured. I have made a correction in the new version.

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

Thanks a lot dear @Edzelf for your fast responce and the bug fixing!
I will try it when at home.
Have a nice day.

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

Dear @Edzelf ,
I have the HELTEC board with me so I can tested in my workplace and I did.
I discovered that If I change the "default" display from BLUETFT to OLED then I still get the "always restarting and crashing". If I leave your default BLUETFT then it is starting without problems but without OLED of course.
Please check if you can.
Thanks

//#define BLUETFT                      // Works also for RED TFT 128x160
#define OLED                         // 64x128 I2C OLED
@Edzelf

This comment has been minimized.

Copy link
Owner

commented Apr 30, 2018

I could not reproduce that. I made a small correction. The display will work now without VS1063.

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

Sorry something wrong in my browser cache, ignore it
dear @Edzelf making the diff between your latest Esp32_radio.ino and the Esp32_radio.ino that was 5 days ago I found them 100% the same. Can you check and make sure that the today changes has been uploaded to github? Thanks

@Edzelf

This comment has been minimized.

Copy link
Owner

commented Apr 30, 2018

Yeah, wrong directory

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

Dear @Edzelf ,
yes it is working now. To help somebody looking the same, to have OLED activated in ESP32-Radio using HELTEC WiFi Kit 32 { ESP32 }, the following changes should be done to Esp32_radio.ino file:

/// change / correct the next two lines 2380, 2381
    { "pin_tft_scl",  &ini_block.tft_scl_pin,     15          },   // Display I2C version /// by mikek ///
    { "pin_tft_sda",  &ini_block.tft_sda_pin,     4          },   // Display I2C version /// by mikek ///

The only small glitch remained and that is: the OLED does not show correctly the last (?) line, I see only some pixels, but this is trivial.

Thanks a lot Mr. @Edzelf for your help and your fantastic work in ESP32-Radio !!!

@Edzelf

This comment has been minimized.

Copy link
Owner

commented Apr 30, 2018

Last line on OLED: must be a long text line in the lower section. Try to change the volume, this will paint the last pixel line of the display.
And try to run th OLED without using pin 16. I don't think the OLED needs a reset.

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

Dear @Edzelf Pin 16 must be High in order to get OLED up and running. if you don't initialize then OLED is off.

@Edzelf

This comment has been minimized.

Copy link
Owner

commented Apr 30, 2018

Yes, I understand. But 16 will be pulled to high by the software. I think it is not necessary to pulse it low for reset.

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

I agree with you. The temporary low is just for reset as you already told. The only question left: Do you have any provision to pull up GPIO 16 High? Because, before I put it in setup section, the OLED was not started.
Thanks.

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

Dear @Edzelf I am not sure how to connect VS1053 to HELTEC Dev board. Can you suggesting me the pin to pin connections?
Thanks.

@Edzelf

This comment has been minimized.

Copy link
Owner

commented Apr 30, 2018

As I said: Gpio 16 is pulled up by the software. All unused pins are pulled HIGH. You will see it in the debug logging: "D:GPIO16 is HIGH".

@mikekgr

This comment has been minimized.

Copy link
Author

commented Apr 30, 2018

Yes you are right, I can confirm @Edzelf that the lines I put at void setup to set GPIO 16 not needed. Thanks

@Edzelf

This comment has been minimized.

Copy link
Owner

commented May 1, 2018

To connect the VS1053 to the Heltec board, you may us someting like:

// Heltec   Signal  Wired to OLED       Wired to VS1053      SDCARD   Wired to the rest
// -------- ------  --------------      -------------------  ------   ---------------
// GPIO16           Reset               -                     -       -
// GPIO5            -                   pin 2 XCS             -       -
// GPIO4            SDA                 -                     -       -
// GPIO2            -                   pin 4 DREQ            -       -
// GPIO17           -                   -                     CS      -
// GPIO18   SCK     -                   pin 5 SCK             CLK     -
// GPIO19   MISO    -                   pin 7 MISO            MISO    -
// GPIO23   MOSI    -                   pin 6 MOSI            MOSI    -
// GPIO15           SCL                 -                     -       -
// GPI03    RXD0    -                   -                     -       Reserved serial input
// GPIO1    TXD0    -                   -                     -       Reserved serial output
// GPIO34   -       -                   pin 1 XDCS            -       Optional pull-up resistor
// GPIO35   -       -                   -                     -       Infrared receiver VS1838B
// GPIO25   -       -                   -                     -       Rotary encoder CLK
// GPIO26   -       -                   -                     -       Rotary encoder DT
// GPIO27   -       -                   -                     -       Rotary encoder SW
// -------  ------  ---------------     -------------------  ------   ----------------
// GND      -       pin 8 GND           pin 8 GND                     Power supply GND
// VCC 5 V  -       pin 7 BL            -                             Power supply
// VCC 5 V  -       pin 6 VCC           pin 9 5V                      Power supply
// EN       -       pin 1 RST           pin 3 XRST                    -

@mikekgr

This comment has been minimized.

Copy link
Author

commented May 1, 2018

Dear @Edzelf
My VS1053 has the following pinout:

VS1053 Module
Pin.1 +5V
Pin.2 GND
Pin.3 CS
Pin.4 MISO
Pin.5 MOSI
Pin.6 SCK
Pin.7 XCS
Pin.8 XRESET
Pin.9 XDCS
Pin.10 DEREQ

following your proposed pinout I have two questions,

  1. What signal is your designated signal ( at HELTEC side ) EN that is connected with XRST of VS1053? My HELTEC board does not have it. I presume that you speak for XRESET as it been referenced to my VS1053 board
  2. My VS1053 board has also CS. Where to connect ( if any ) ?

Thanks a lot

@Edzelf

This comment has been minimized.

Copy link
Owner

commented May 1, 2018

1 - RST on your Heltec board is the same as EN.
2 - CS is probably for the SD card, so you can use GPIO17 for this.

@mikekgr

This comment has been minimized.

Copy link
Author

commented May 1, 2018

Dear @Edzelf Many thanks. It is working fine now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.