Migrating ESP32 project to Raspberry Pi

The Raspberry Pi is a series of credit card-sized single-board computers developed in the United Kingdom by the Raspberry Pi Foundation to promote the teaching of basic computer science in schools and developing countries.

Post Reply
User avatar
/RaspberryPi
Corporate
Posts: 2449
Joined: Wed Jun 05, 2019 1:29 am

Migrating ESP32 project to Raspberry Pi

Post by /RaspberryPi »


(I intended to post this to /r/esp32 but it's still in restricted mode, so I'd like to ask the same questions here. thank you).

Hello folks,

I'm looking for feedback on the feasibility of migrating my project from ESP32 to RPi. I'm at the point where I need to add Ethernet connectivity and need a faster processor. I've looked at all the ESP32 Ethernet options, and only the WESP32 will work because I need both ESP32 SPI busses for an SD card (MMC) and the other for an 8 channel SPI DAC.

So I'm considering moving over to RPi which already has an SD card, Wifi, and Ethernet built in. I'm not an EE or a hard-core software engineer, but I know my way around C/C++ and ESP32 and PCB development, but have never done anything with Rpi yet.

I'm currently using the ESP32 Arduino framework with Platform.io and love this development environment. My C code is pretty straight forward -- I read 8 channel WAV files, do some digital processing, send them to the DAC, and process the analog output (I designed a PCB to do all the analog signal processing). It also has a built-in web interface (over Wifi) for access and control. For the DAC interface on the SPI pins, I'm using direct register writes for maximum speed. Right now for each cycle, I'm writing 16 bits x 8 channels of data to the DAC on ESP32, the max speed I can get (using a timer+interrupts) is 32khz. Ultimately, I'd like to be able to get to 48khz. So that's another reason why I am considering moving to Rpi.

My question is -- generally speaking -- how hard is it to migrate code like this from ESP32 to Rpi? (And still use Platform.io?) Obviously it won't be a "drop-in and go" type thing. I've spent two years developing my ESP32 project, I'd like to leverage as much as possible without starting over. And any tips or pointers would be helpful and appreciated.

Thanks.
submitted by /u/EV-CPO
[link] [comments]

Source: https://www.reddit.com/r/raspberry_pi/c ... pberry_pi/
/RaspberryPi
Post Reply

Return to “Raspberry Pi Forum”