It is so simple to drive ESP32 (MicroPython) from Arduino Due.
Due has 4 hardware serial interfaces, I used Serial1 and connected Pin 18 TX1 to ESP32 RX (and GND/3V).
This sketch just triggers several MicroPython calculations:
Code: Select all
void setup() {
int a,b,c;
Serial1.begin(115200);
for(a=2; a<=5; ++a)
for(b=2; b<=4; ++b)
for(c=2; c<=3; ++c) {
Serial1.print(a);
Serial1.print("**");
Serial1.print(b);
Serial1.print("**");
Serial1.println(c);
}
delay(1000);
}
void loop() {
}
This is the youtube video demonstrating sketch:
https://www.youtube.com/watch?v=uNrtUPG ... e=youtu.be
Next step:
Combine Arduino USBHost library KeyboardController sketch with Serial1 code to use wireless USB keyboard connetced to native Due MicroUSB port for ESP32 MicroPython REPL input.
P.S
This is bottom part of ESP32 MicroPython boot.py, responsible for redirection of REPL output to Oled:
Code: Select all
...
import machine, ssd1306, os
i2c = machine.I2C(scl=machine.Pin(4), sda=machine.Pin(5))
oled = ssd1306.SSD1306_I2C(128, 64, i2c)
from fbconsole import FBConsole
scr = FBConsole(oled)
os.dupterm(scr)