Software & Apps

CDUMP / Radiacode: Radiacode-10X Radiation Detector Controls by Python. Collect real-time measurements, spectra analysis, and handling USB or Bluetooth device settings.

Pypi version
Python 3.9+
LIBLE: MIT

Python Library for interfacing of Radiacode 10x Radiation and spectrometer detectors. Control your device, collect measurements, and analyze radiation data quickly.

  • πŸ“Š Real-time radiation measurements
  • πŸ“ˆ Earn spectrum and analysis
  • πŸ”Œ USB and Connecting to Bluetooth
  • 🌐 included Example to Web interface
  • πŸ“± Device Configuration Configuration

Interactive Web Interface Example (back pender | Fronten):

RADIACODE-WEBSERAGE-Example

pip install --upgrade 'radiacode(examples)'

Run the web interface displayed in the screenshot above:

# Via Bluetooth (replace with your device's address)
$ python3 -m radiacode-examples.webserver --bluetooth-mac 52:43:01:02:03:04

# Via USB connection
$ sudo python3 -m radiacode-examples.webserver

Standard example of terminal output (same option as web interface):

$ python3 -m radiacode-examples.basic
pip install --upgrade radiacode
from radiacode import RadiaCode, RealTimeData

# Connect to device (USB by default)
device = RadiaCode()

# Get current radiation measurements
data = device.data_buf()
for record in data:
    if isinstance(record, RealTimeData):
        print(f"Dose rate: {record.dose_rate}")

# Get spectrum data
spectrum = device.spectrum()
print(f"Live time: {spectrum.duration}s")
print(f"Total counts: {sum(spectrum.counts)}")

# Configure device
device.set_display_brightness(5)  # 0-9 brightness level
device.set_language('en')        # 'en' or 'ru'
# Bluetooth connection
device = RadiaCode(bluetooth_mac="52:43:01:02:03:04")

# Connect to specific USB device
device = RadiaCode(serial_number="YOUR_SERIAL_NUMBER")

# Energy calibration
coefficients = device.energy_calib()
print(f"Calibration coefficients: {coefficients}")

# Reset accumulated data
device.dose_reset()
device.spectrum_reset()

# Configure device behavior
device.set_sound_on(True)
device.set_vibro_on(True)
device.set_display_off_time(30)  # Auto-off after 30 seconds
  1. Install the requirements:

    # Install Poetry
    curl -sSL https://install.python-poetry.org | python3 -
  2. Clone and Setup:

    git clone https://github.com/cdump/radiacode.git
    cd radiacode
    poetry install
  3. Examples of running:

    poetry run python radiacode-examples/basic.py

⚠️ Forms specific specific notes

  • βœ… USB connectivity works from the box
  • ❌ Bluetooth is not supported (blungpy limit)
  • πŸ“ Required: brew install libusb
  • βœ… We USB and Bluetooth are fully supported
  • πŸ“ Required: libusb and Bluetooth libraries
  • πŸ”‘ maybe Udev’s laws For access to USB
  • USB connection supports
  • βœ… Supports Bluetooth
  • πŸ“ Required: USB drivers

This project is licensed below the MIT license – see the can file for details.


https://opengraph.githubassets.com/dfc5c21790bb04200aa747b07861e0cfd45637661683a75368ee4af60c2e68aa/cdump/radiacode

2025-02-24 13:52:00

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button