Complete Web Example
Overview
This example provides a complete, ready-to-use web application demonstrating common Red Pitaya web development patterns. It’s an excellent starting point for understanding the full application structure.
Download
Download the complete project:
Red Pitaya Web App Example (OS 2.0)
What’s Included
The example demonstrates:
- Input field handling
Interactive form elements that send data to the backend for processing
- Backend logic integration
Complete parameter handling between frontend and backend
- Array data transmission
Example of transmitting and receiving arrays of data (random number generation)
- Complete application structure
All required files properly organized (HTML, CSS, JavaScript, C++ controller)
Features Demonstrated
Frontend features
HTML form inputs
Real-time data display
WebSocket communication
Data visualization
User interaction handling
Backend features
Parameter processing
Signal generation
Data array management
Random data generation example
Proper initialization and cleanup
Using This Example
Installation
Download and extract the ZIP file
Copy the extracted folder to /opt/redpitaya/www/apps/ on your Red Pitaya
Compile the backend:
$ cd /opt/redpitaya/www/apps/<example_folder>/ $ make INSTALL_DIR=/opt/redpitaya
Access your Red Pitaya web interface
The application should appear in the application list
Learning from the example
This example is designed to be studied and modified. Key areas to explore:
- HTML structure (index.html)
See how form elements and display areas are organized
- JavaScript logic (js/app.js)
Understand WebSocket communication and data handling
- Controller code (src/main.cpp)
Learn parameter and signal management
- Styling (css/style.css)
View professional CSS organization
Customization
Use this example as a template for your own applications:
Modify the UI - Change HTML and CSS to match your needs
Add parameters - Extend the parameter list for your hardware control
Implement your logic - Replace random data generation with your algorithms
Test incrementally - Make small changes and test frequently