Metadata-Version: 2.4
Name: binaryduino
Version: 0.1.0
Summary: Binary and Arduino simulation toolkit with waveform visualization and signal processing
Home-page: https://github.com/EdenGithhub/binaryduino
Author: Adam Alcander et Eden
Author-email: aeden6877@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: colorama
Requires-Dist: bitstring
Requires-Dist: pyserial
Requires-Dist: loguru
Requires-Dist: rich
Requires-Dist: pydantic
Requires-Dist: typer
Requires-Dist: tqdm
Requires-Dist: python-dotenv
Requires-Dist: click
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Binaryduino

Binaryduino is a powerful Python library for simulating binary-level communication with Arduino-like devices. It enables developers to encode messages into binary, simulate noisy transmission, visualize waveforms, run virtual socket communication, and handle Arduino serial simulations. The library is ideal for educational purposes, low-level protocol simulation, and digital communication visualization.

---

## 🚀 Features

- Encode/decode text messages to binary
- Visualize binary waveforms using matplotlib
- Simulate noisy signals and compute accuracy
- Simulate Arduino serial communication (mock)
- Binary manipulation (AND, OR, XOR, flip, parity)
- Pydantic-based configuration validation
- Rich CLI via Click and Typer
- Load environment variables securely
- Save/load binary to/from file
- Display binary data in styled tables

---

## 📦 Installation

Ensure you have Python 3.7+ and pip installed. Then, run:

```bash
pip install binaryduino
```

Or, from local development:

```bash
git clone https://github.com/EdenGithhub/binaryduino.git
cd binaryduino
pip install -e .
```

---

## 🛠 Usage

### CLI Binary Encoder

```bash
python -m binaryduino.core
```

You'll be prompted:

```bash
Enter message to encode: Hello
```

➡ This will:
- Encode "Hello" to binary
- Display the binary result
- Open waveform visualization

### Example: Visualizing Binary Signal

```python
from binaryduino.core import binary_waveform

binary_waveform("110011001100")
```

### Example: Encoding and Decoding

```python
from binaryduino.core import encode_message, decode_message

binary = encode_message("Hi")
text = decode_message(binary)
print(text)  # Output: Hi
```

### Example: Simulating Noisy Transmission

```python
from binaryduino.core import generate_signal_noise, signal_accuracy

original = "10101010"
noisy = generate_signal_noise(original, noise_level=0.2)
accuracy = signal_accuracy(original, noisy)
print(f"Accuracy: {accuracy * 100:.2f}%")
```

---

## 🧪 Development

### Setup Virtual Environment

```powershell
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
```

### Run CLI

```bash
python -m binaryduino.core
```

### Test Pydantic Config Validation

```python
from binaryduino.core import test_config_validation

test_config_validation()
```

---

## 🔐 Environment Variables for PyPI

```powershell
$env:PYPI_USERNAME = "your_username"
$env:PYPI_TOKEN = "pypi-xxxxxxx"
```

To upload with `twine`:

```powershell
python -m twine upload dist/* --username $env:PYPI_USERNAME --password $env:PYPI_TOKEN --verbose
```

---

## 📜 License

MIT License. See [LICENSE](LICENSE) file.

---

## 🙌 Author

Created by Adam Alcander et Eden. Contributions welcome!
