esp32 P4 demo

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

esp32 P4 demo

Postby chegewara » Sun Aug 25, 2024 12:42 am

Greetings community.

As some of you may already know ive been playing a bit with USB on esp32 S2/S3, and now we have huge upgrade on P4 to USB high speed, so its time to play with it one more time and to see how it works.

I started with my old USB host code and MSC works pretty good, ACM probably too, but not tested it yet. Since ive got few request about MIDI i thought it may be good opportunity to see what is it, and I decided to buy some small midi controller. I thought novation launchpad mini mk3 may be good hardware to start with, and i believe it was good choice.

I have had no idea how midi works, and you can imagine how much surprised i was when i found that communication is as easy as regular USB serial device like ACM or VCP.

Long story short i wrote some demo code which is using launchpad mk3 midi protocol for 2 way communication with android app from play store. Here is demo how it works with USB midi, LVGL and android app. I hope you like it:

https://youtu.be/u30H9fkrLgQ


Just few additional info:
- in this case i should have to make USB device instead of host, to communicate with android phone
- esp32 P4 is communicating with high speed in this example, since smartphone takes control over setup and i dont mind
- as you can see on this demo, there is few times switched buttons layout; almost every time app is sending 64-81 buttons, 4 bytes each data, and as you can see it is very smooth (although there is space to improve it)

username
Posts: 536
Joined: Thu May 03, 2018 1:18 pm

Re: esp32 P4 demo

Postby username » Sun Aug 25, 2024 4:14 am

Thanks for the post, looks like you having a lot of fun.

cimi_al
Posts: 1
Joined: Sun Aug 25, 2024 7:48 am

Re: esp32 P4 demo

Postby cimi_al » Sun Aug 25, 2024 7:52 am

Excellent, as far as i can see you are one of the first to create something with P4, please can you create a video of how you created it.

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp32 P4 demo

Postby chegewara » Sun Aug 25, 2024 11:11 am

Thanks guys.
For sure i am having fun. Its like discovering esp32 all over again, just this time i am less noob-ish and i know what i want and i can to do with it.
I am cant wait to see linux on P4, this time for real.
cimi_al wrote: Excellent, as far as i can see you are one of the first to create something with P4, please can you create a video of how you created it.
Sorry, but i am not youtuber, i am not doing such stuff, and my code looks like Frankenstein monster. In fact there is not much to show, because everything looks exactly the same like with any other esp32 chip, you have to know esp-idf, freertos, lvgl and to find BSP component for P4, which makes life much easier with esp-idf v5.4+.

https://components.espressif.com/compon ... _ev_board/

and this component if you want to use wifi with P4 (on espressif ev board, with C6); the wifi code looks exactly the same as on normal esp32 and the only exception is that component added
https://components.espressif.com/compon ... ions/0.3.0



PS i would like to see DPI to HDMI converter too
i found some on internet, but im not sure if those can be used with P4 ev board and how hard it could be

User avatar
rudi ;-)
Posts: 1729
Joined: Fri Nov 13, 2015 3:25 pm

Re: esp32 P4 demo

Postby rudi ;-) » Sun Aug 25, 2024 4:27 pm

chegewara wrote:
Sun Aug 25, 2024 11:11 am
I am cant wait to see linux on P4, this time for real.
To tell you about it: P4 is incredibly fast, it's a real machine. Long awaited - finally here.
I'm also happy that it's a pure MCU without a radio. Hope that ADC sampling will run fine and well. All eyes on it. That's what matters now with the P4.
The same with the C5 (Dual WiFi6) a fantastic enrichment. In combination (P4, C5) fantastic ( UART, SDIO/SPI )
I can confirm you from workbench. Because of Linux: there are a few things already on the way... also in the pipe.
With 32MB Flash && 32MB PSRAM in the package as a MCU base (ESP32-P4NRW32) is a super nice buildroot start... but also possible as a compact vers JLYK Don't miss it :)
chegewara wrote:
Sun Aug 25, 2024 11:11 am
Long story short i wrote some demo code which is using launchpad mk3 midi protocol for 2 way communication with android app from play store. Here is demo how it works with USB midi, LVGL and android app. I hope you like it:

https://youtu.be/u30H9fkrLgQ
..nice demo!
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp32 P4 demo

Postby chegewara » Sun Aug 25, 2024 11:11 pm

rudi ;-) wrote:
The same with the C5 (Dual WiFi6) a fantastic enrichment. In combination (P4, C5) fantastic ( UART, SDIO/SPI )
I can confirm you from workbench. Because of Linux: there are a few things already on the way... also in the pipe.
With 32MB Flash && 32MB PSRAM in the package as a MCU base (ESP32-P4NRW32) is a super nice buildroot start... but also possible as a compact vers JLYK Don't miss it :)
chegewara wrote:
Sun Aug 25, 2024 11:11 am
Long story short i wrote some demo code which is using launchpad mk3 midi protocol for 2 way communication with android app from play store. Here is demo how it works with USB midi, LVGL and android app. I hope you like it:

https://youtu.be/u30H9fkrLgQ
..nice demo!
Thanks.

Here is code, but forgive me please, it is very rough (im almost ashamed publishing it).
https://github.com/chegewara/esp32-p4-host-midi-demo

khurram
Posts: 1
Joined: Tue Oct 22, 2024 12:17 pm

Re: esp32 P4 demo

Postby khurram » Tue Oct 22, 2024 1:26 pm

chegewara wrote:
Sun Aug 25, 2024 11:11 pm
rudi ;-) wrote:
The same with the C5 (Dual WiFi6) a fantastic enrichment. In combination (P4, C5) fantastic ( UART, SDIO/SPI )
I can confirm you from workbench. Because of Linux: there are a few things already on the way... also in the pipe.
With 32MB Flash && 32MB PSRAM in the package as a MCU base (ESP32-P4NRW32) is a super nice buildroot start... but also possible as a compact vers JLYK Don't miss it :)
chegewara wrote:
Sun Aug 25, 2024 11:11 am
Long story short i wrote some demo code which is using launchpad mk3 midi protocol for 2 way communication with android app from play store. Here is demo how it works with USB midi, LVGL and android app. I hope you like it:

https://youtu.be/u30H9fkrLgQ
..nice demo!
Thanks.

Here is code, but forgive me please, it is very rough (im almost ashamed publishing it).
https://github.com/chegewara/esp32-p4-host-midi-demo

Hello chegwara,
First of all thanks for providing the demo with codes, I have just recieved my ESP32-P4 yesterday, As i am very new to the ESP-IDF, I'm used to arduino envrionment.
I have compiled and uploaded your project to the board, and as you can see in the attachment, screen turns on with blue background and then it reboots, What could be the issue ?
Thanks!
Attachments
esp32p4-bluescreen-.gif
esp32p4-bluescreen-.gif (1.63 MiB) Viewed 1333 times

chegewara
Posts: 2375
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp32 P4 demo

Postby chegewara » Tue Oct 29, 2024 4:51 pm

Hi,
this demo is meant to be used with a specific hardware, so if you are connecting different one, it may crash.

I dont remember, but it also may crash if you not change type of USB connection on android smartphone.

Who is online

Users browsing this forum: No registered users and 47 guests