0%

MaixDuino 3 - WiFi

1. Breif Summary

In my previous two MaixDuino blog posts MaixDuino 1 and MaixDuino 2, flashing was done using the Arduino IDE. In hindsight, this was neither necessary nor particularly convenient. Especially after flashing the Sipeed official firmware MaixPy-v1 onto the MaixDuino board, there is no real need to rely on the Arduino IDE anymore.

This blog post continues the MaixDuino exploration and completes two experiments:

  • A very simple implementation of dual-camera image capture on the MaixDuino board, with alternating display on the onboard LCD screen (Refer to LCD API), without relying on Arduino IDE at all;

  • Streaming the stereo camera images over the MaixDuino’s onboard Wi-Fi to a remote display endpoint.

2. Cable Connection

Maix Bit board Connected to a ESP32-C3 Super Mini MaixDuino board Already Embedded a ESP32-WROOM-32
Cable Connection - Maix Bit Cable Connection - MaixDuino

3. Stream From Two Cameras

3.1 Flash MaixPy-v1 Onto /dev/ttyUSB0

MaixPy-v1 kflash MaixDuino

3.2 Flash Maixduino_esp32_fimware Onto /dev/ttyUSB1 (Optional)

  • Clearly, there is a typo here Maixduino_esp32_fimware
  • Since this is Optional, I just have this step ignored for now.

3.3 Python Scripts For Streaming Two Cameras

The full Python scripts of streaming from 2 cameras can be found in my this Github Repo maixduino_stereocam_esp32:

MaixPy-v1 ampy 2 Cameras and LCD

3.4 Demonstration on LCD

One Image Captured From Left Camera One Image Captured From Right Camera
Left Camera Image Right Camera Image

4. WiFi

None of my previous 3 blogs talked about WiFi.

MaixDuino‘s Sipeed-M1 uses the FIXED hard SPI1 to communicate with its onboard ESP32-WROOM-32, where you need to use network.ESP32_SPI for communication via WiFi, as follows:

1
2
3
4
5
6
7
8
9
nic = network.ESP32_SPI(
cs=gh(gpiohs["cs"]),
rst=gh(gpiohs["rst"]),
rdy=gh(gpiohs["rdy"]),
mosi=gh(gpiohs["mosi"]),
miso=gh(gpiohs["miso"]),
sclk=gh(gpiohs["sclk"]),
spi=1,
)

4.1 Python Scripts

4.2 Demonstration

4.2.1 MaixPy REPL

MaixPy-v1 REPL MaixDuino WiFi Successful

4.2.2 Camera with LCD

4.2.3 On Remote PC