Webcam Capture on the Web

4 min readApr 9, 2025

Environment Setup

Hardware Configuration

Connect the NXP MCXN947 board’s USB to Serial adapter to the PC using a USB cable.

Software Configuration

Extract the handson1_rtt_intro.7z file, open the project.uvprojx file using Keil, compile the project, and download the code.

Execute the compilation. Once the compilation is complete, click the download button to transfer the firmware to the development board. After the download is finished, the program will automatically start running, allowing you to observe the program’s operation.

Note: The project is configured by default to use CMSIS-DAP for programming. Simply click the download button to upload the program to the development board.

Program Execution

If the program does not run automatically, press the reset button to restart the development board and observe the actual effect of the LED on the board. When running normally, the LED will blink periodically, as shown in the figure below:

Connect the corresponding serial port of the development board to the PC, and open the relevant serial port in the serial tool (115200–8–1-N). After resetting the device, you will be able to see the output information from RT-Thread:

Network Applications

Hardware Configuration

Connect the USB-to-serial adapter of the development board to the PC using a USB cable, and simultaneously install the RW007 Arduino expansion board onto the MCXN947 board.

Software Configuration

Extract handson2_rw007_wifi联网.7z, open the project.uvprojx project file, compile the project, and download it to the development board.

After downloading, press the Reset button on the board, and the serial port will print the following log:

When the display shows rw007 sn: and rw007 ver:, it indicates that the RW007 has been successfully initialized.

● wifi help: View WiFi operations

● wifi scan: Scan for WiFi, which will list all detected WiFi names (it is recommended to connect to a mobile hotspot).

● wifi join: Connect to a specific WiFi based on its name. After a successful connection, the serial port will print wifi connect success ssid: xxxx and Got IP address: xxx.xxx.xxx.xxx. The serial port will print the following log.

In this case, the mobile hotspot named “rw007” has the WiFi IP address: 192.168.43.139.

Video Monitoring Practice

Hardware Configuration

On the basis of the previous step, install the camera as shown in the figure below:

Note the installation position of the camera; there is already a silkscreen marking on the FRDM-MCXN947 board:

Software Configuration

1. Extract handson_智慧家居视频监测.7z, open the project.uvprojx file, compile and download (same as previous steps), and burn it to the board. Open the serial port assistant, reset the development board, and the serial port assistant log will show that the demo is working normally:

2. Input the WiFi username and password (you can use your own mobile hotspot or the public WiFi provided at the training location) with the command wifi join name passwd. After a successful connection, the serial port will print the IP address, as shown in the figure below.

3. Input webserver start 80 to start the web server.

4. Ensure that your PC is also connected to the same network segment as RW007 (for example, both connected to a mobile hotspot or the WiFi at the training location). Open a browser and enter the IP address (e.g., 192.168.8.100) to access the server monitoring page:

Once opened successfully, it will display the real-time video from the camera. You can use the “shoot” button to take a screenshot of the real-time image and save it to the file system of the development board.

--

--

RT-Thread IoT OS
RT-Thread IoT OS

Written by RT-Thread IoT OS

An Open-Source Community-Powered Real-Time Operating System (RTOS) Project! Let’s develop, DIY, create, share, and explore this new IoT World together!

No responses yet