A curated collection of programming examples for Red Pitaya boards, organized to make it easier to find the right language, interface, or hardware-specific example.
This repository contains practical examples for programming and controlling Red Pitaya boards. The examples cover signal acquisition, generation, digital I/O, communication protocols, streaming, logic analysis, and board-specific utilities.
Programming options:
- Remote control from a PC or laptop (SCPI commands)
- On-board execution directly on the Red Pitaya board (API commands)
Supported example sets:
- API examples:
- Python
- C++
- SCPI examples:
- Python
- MATLAB
- LabVIEW
- Legacy SCPI commands (pre 1.04 OS)
Other resources:
- Web application tutorials
- E3 module source code
- Arduino examples
Examples are organized by feature area. SCPI and API examples share the same directory structure for consistency.
Acquisition/- Data acquisition and samplingAcq_Gen/- Combined acquisition and generationAnalog/- Analog input/output operationsDigital/- Digital GPIO and PWM examplesDigital_com/- UART, I2C, SPI, and CAN communicationDMM/- Deep Memory Mode for interfacing with RAM containing acquisition and generation examplesGeneration/- Signal generation and AWG examplesHardware/- Hardware-specific features and configurationLCR/- LCR meter functionalityLogic_analyzer/- Protocol decoding and analysisMultiboard/- Multi-board synchronizationOther/- Utility scripts and special-purpose examplesSocket_client_server/- Socket-based client/server exampleStreaming/- Data streaming examples
Arduino/- Examples for Arduino-based integration.E3_source_code/- Source code for the E3 expansion module.web-tutorial/- Web application tutorials and supporting examples.old/- Archived or legacy material kept for reference.
- Red Pitaya board on the same local network as computer for remote use
- SSH access for on-board execution
- Compatible development environment for the language you want to use
-
Clone the repository to your local machine:
git clone https://github.com/RedPitaya/RedPitaya-Examples.git cd RedPitaya-Examples -
SCPI examples: Turn on SCPI server on the Red Pitaya board. Make sure the redpitaya_scpi.py library is in the same folder as the example your want to run (or correctly referenced in the library path).
python SCPI_examples/Python_SCPI/acq_1_treshold.py
-
API examples: Copy the example files to the Red Pitaya board and ssh into the board to run them. For example:
scp -r API_examples root@rp-xxxxxx.local:/root
SCPI examples:
python SCPI_examples/Python_SCPI/acq_1_treshold.pyOn the Red Pitaya board:
ssh root@rp-xxxxxx.local
cd /root/API-examples/Python-API
python Digital/dig_1_led_blink.pyFor detailed API documentation, command references, and programming guides, visit the Red Pitaya documentation site.
Key documentation areas include:
- API and remote control
- Command reference
- Hardware specifications
- Getting started guides
- Application notes and tutorials
These examples are compatible with Red Pitaya OS 2.00 and later on all Red Pitaya boards. Check the individual example documentation for any specific requirements or dependencies.
Contributions are welcome. If you have examples, improvements, or bug fixes:
- Fork the repository
- Create a feature branch
- Make your changes with clear documentation
- Submit a pull request
Please follow the structure and documentation style used in the API_examples/Python_API/ examples.
- Issues: report bugs or request features via GitHub Issues
- Forum
- Red Pitaya official documentation website
- Email: support@redpitaya.com
This examples repository is released under the GNU General Public License.
Red Pitaya teachnical team