Hi,
im working on a project where i need to be able to comunicate the RB zero 2w with an ESP8266 over serial coms more spesific i need to be able to send scripts from the raspberry to the esp and then the script has to run itself.
ive tried to do this for a while, and ive only managed to send single bits like numbers or letters and in the process somehow ive bricked like 3 esp having to reinstall the micropython frimware im rly desperate T-T
{Disclaimer: I have no experience with either an RPi02W or an esp8266. Comments offered as generic and to provoke further thought.}
What do you mean by 'serial'? Does the micropython firmware for your esp8266 offer a REPL via its usb connector? Isn't that a form of serial connection?
Otherwise, can the MicroPython firmware on your esp8266 microcontroller be configured to present a REPL via a 'UART' serial port? (For example, this option is not enabled by default in the firmware for a Raspberry Pi Pico, but the firmware can be re-built to do so.)
Once you have a REPL on the esp8266 accessible from your RPI02W then there are several tools available that can implement your Send_and_Run requirement.
Thonny, Viper-IDE, and mpremote are three examples I have used from RasPiOS on other RPi microcomputer boards such as RPi4/5 to work with micropython scripts on a Raspberry Pi Pico microcontroller. There may be other suitable tools. I am aware of ampy but have not used it.
Hope that gives you something to work on.
If you plan to use serial connection via hardware UART (as distinct from via usb) then be careful with the voltage of the signals - RPi GPIO pins, even if used as a UART, are still limited to handling 0v-3.3v inputs.
Statistics: Posted by B.Goode — Tue Oct 22, 2024 11:35 am