### PlatformIO command line installation Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Install ESPNowCam via PlatformIO command line using pio pkg install. ```python pio pkg install --library "hpsaturn/ESPNowCam@^0.2.2" ``` -------------------------------- ### Build and upload Arduino example with PlatformIO Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Run this command inside an Arduino example directory to compile and upload it using PlatformIO. Works for .ino samples. ```bash pio run --target upload ``` -------------------------------- ### PlatformIO lib_deps installation Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Add this line to the lib_deps option of your [env:] section in platformio.ini to install ESPNowCam version 0.2.2. ```python hpsaturn/EspNowCam@^0.2.2 ``` -------------------------------- ### WiFi Raw 802.11tx receiver setup Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Sets up a receiver using WiFi raw mode. Configure the receive buffer, callback, channel, and chunk size to match the sender. ```cpp WiFiRawComm wifiRaw; ESPNowCam radio(&wifiRaw); radio.setRecvBuffer(fb); // fixed buffer radio.setRecvCallback(onDataReady); // similar callback to other modes radio.setChannel(6); // improve quality radio.init(512); // the same sender chunk size ``` -------------------------------- ### WiFi Raw 802.11tx sender setup Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Configures the radio to use WiFi raw mode for potentially better performance. Set the target MAC, channel, and chunk size before sending. ```cpp WiFiRawComm wifiRaw; ESPNowCam radio(&wifiRaw); radio.setTarget(macRecv); // receiver mac address to improve quality radio.setChannel(6); // improve quality (recommended) radio.init(512); // you are able to change the chunk size radio.sendData(out_data, out_data_len); ``` -------------------------------- ### Compile and upload a sample with PlatformIO Source: https://github.com/hpsaturn/espnowcam/blob/master/examples/README.md Compile and upload a specific sample by selecting one of the environment names from the tables. Run this command in the root of the project. ```bash pio run -e m5cores3-espnow-receiver --target upload ``` -------------------------------- ### Receive data with ESPNowCam Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Sets up a receive buffer and callback, then initializes the radio. The callback receives the data length and can process the received frame. ```cpp radio.setRecvBuffer(fb); radio.setRecvCallback(onDataReady); radio.init(); ``` ```cpp void onDataReady(uint32_t length) { tft.drawJpg(fb, length , 0, 0, dw, dh); } ``` -------------------------------- ### Use predefined camera driver Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Includes and instantiates a predefined camera driver, such as CamFreenove, for easy camera configuration. ```cpp #include #include CamFreenove Camera; ``` -------------------------------- ### Configure camera to use DRAM and internal JPG Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Pre-configures the camera to use DRAM and the internal JPEG compressor, which can be faster and provide better quality at the same JPGQ level, but uses more bandwidth. ```cpp Camera.config.pixel_format = PIXFORMAT_JPEG; Camera.config.frame_size = FRAMESIZE_QVGA; Camera.config.fb_count = 2; Camera.config.fb_location = CAMERA_FB_IN_DRAM; ``` -------------------------------- ### Send data with ESPNowCam Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Initializes the ESPNowCam radio and sends a data buffer. Use this to transmit any kind of data by providing a buffer and its length. ```cpp #include ESPNowCam radio; radio.init(); radio.sendData(data, data_len); ``` -------------------------------- ### Configure multiple receivers for N:1 mode Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Sets up multiple receive filters, each with its own buffer, MAC address, and callback. Use this to receive from multiple cameras on a single receiver. ```cpp radio.setRecvFilter(fb_cam1, mac_cam1, onCam1DataReady); radio.setRecvFilter(fb_cam2, mac_cam2, onCam2DataReady); radio.setRecvFilter(fb_cam3, mac_cam3, onCam3DataReady); ``` -------------------------------- ### Set target MAC for P2P mode Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Configures a specific receiver MAC address for point-to-point communication. Recommended to improve performance and reduce noise and glitches. ```cpp const uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC}; radio.setTarget(macRecv); radio.init(); ``` -------------------------------- ### Set radio channel Source: https://github.com/hpsaturn/espnowcam/blob/master/README.md Configures the radio channel. All devices must use the same channel; this setting is optional but can improve connection quality. ```cpp radio.setChannel(2); radio.init(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.